Put Object in folder of S3 bucket from mendix

0
Hi Reader,   I have requirement in which there is the bucket on S3 and inside that S3 bucket there is many folders. Now I have to put object inside one of the folder. How can I do this? Please suggest me.   Thanks and Regards, Harshraj Singh
asked
3 answers
4

Hi Harshraj Singh,

You can Put your object on your desired S3 folder easily. Please find the below image for your reference.

image.png

image.pngimage.png

 

When creating your put object request , it's important to follow a specific format for assigning a value to the Key attribute. For example, you might use the format Country/CountryName/ObjectName. In this case, "Country" represents the main folder, "CountryName" is the subfolder, and "ObjectName" is the name of the object you wish to store in S3 under this path.

Keep in mind, if the specified main folder and subfolder already exist in your S3 bucket, the new object will be stored within that existing structure. However, if the folders do not already exist, your REST call will automatically create the main and subfolders with the names you provided and then place your object inside the newly created folders.

 

Hope you find this helpful. Cheers!

answered
0

Hello,

You need to use this marketplace component https://marketplace.mendix.com/link/component/120340 where you can connect to the aws s3 bucket, but don't use the same bucket used to deploy the application if your environment is mendix or privite cloud on kubernetes.

 

 

answered
0

Hi Harshraj,

you have to change the key value of put object

Suppose you have a folder name upload  inside bucket

then in key put 'upload/'+$filedocument/name , It will work.

 

Please mark this accepted , if it solves your problem, or let me know if you need more help!

answered