Solved

How to target specific subfolder when Upload file using S3Connector transformer?

  • 11 April 2022
  • 2 replies
  • 23 views

Badge +1

I've successfully made an S3 Web Connection and can write a file to a specific S3 bucket. I'm not seeing how to send the a file to a specific folder within the bucket using the S3Connector transformer settings. See attached screenshot. I have the Request Action set to "Upload."

 

There are input fields for Bucket and Path. I want to upload a file to my bucket "testBucket" and place the file in a subfolder named "Files" that's in a project specific folder named "$(projectName)." In S3 that's testBucket > $(projectName) folder > Files folder > file.png

 

As it is, the Bucket input has to match the S3 bucket name you are uploading to, but it also creates a new folder with your bucket name, and the Path input creates a subfolder within that bucket. In S3 that's testBucket > testBucket folder > $(projectName) folder > file.png.

 

Any suggestions on how to target testBucket > $(projectName) folder > Files folder > file.png?

icon

Best answer by osdev 19 April 2022, 19:45

View original

2 replies

Badge +2

Hi @osdev​,

The easiest way would likely be to create a new, temporary attribute and set the value to this:

$(projectName)/Files/

This will allow you to set the path parameter in the S3Connecter based on the new attribute: 

imageYou can also do this with a  published and private parameter in case you don't want to create an attribute.

Badge +1

Thanks @chrisatsafe​ . I had a support ticket out on this and we just found out that the Amazon S3 Compatible Storage Web Service in Web Connections has an issue with saving a file to a specific folder path in S3, even if you type the path correctly as you have shown. I switched to using the Amazon Web Services Web Service, which can also be used by the S3Connector transformer, and using the path description you pointed out, it works now!

Reply