Choose a folder to upload a file to, not just the bucket (e.g. we have a number of folders within a bucket that separate out user avatars, cover images etc.).
If preffering to use App Connect S3 Upload how would do the above, and also return the full URL path once upload has been completed so we can then update the users avatar url in the database.
Lastly, can we do any image processing on the AC side? Currently we upload an image, resize it twice then update the DB with 3 file urls (not on Wappler) which I’d like to recreate.
It looks like SC would be the only way to do this - but I still can’t see how to choose folders within a bucket?
I’m able to upload the file to the server, resize it, connect to S3 and put the file to S3 - everything works a treat.
But I cannot mirror the path in AWS - it just keeps creating blank folders, and then it’s own folder structure (I know AWS does not consider folders as the same).
In addition, I’ve been trying to easily return the file path - I assumed using the ‘output’ option on ‘Put File’ would do this, but it doesn’t - so I can create the strong myself using the file name created from the resize step and just manually adding the S3 bucket URL.
Can you advise the best way in Server Connect actions, including an image resize to mirror the AWS file path please?
save image path
Put file section
And it creates a new blank ‘folder’ in AWS and then a new ‘user-avatar’ ‘folder’ and then puts the file in there.
I’ve tried a few different variations, each time it creates the blank folder, and then public or user-avatar folder paths.
@George - so I’ve been able to get the basic file structure working, without the blank folder being created - however I’m still having the same issue if I use image manipulation on the server side, save the image and then try to put that image to S3.
This is my server connect
My save image action
My S3 AWS action
What it should create is amazinawsurl/bucketname/user-avatar/{guid}_thumbnail_255x255{ext}