S3 - When using server side resize image actions - trying to PUT to S3 creates blank file structure

======== TEMPLATE BUG FORM ========

Wappler Version : 3.3.1
Operating System : MAC
Project Type: NodeJS, MySql 8

Expected behavior

I should be able to instruct the file path when I PUT a file to S3, as an output of a ‘Save Image’ action.

For example s3bucketurl/user-uploads/filename.jpg

This works fine when simply uploading an image without any ‘Save Image’ action.

Actual behavior

When using the Save Image output in the next action step (PUT to S3) it creates a blank folder path, or always creates the folder path where I’m saving locally.


How to reproduce

Screen Shot 2020-09-16 at 8.40.32 am

Screen Shot 2020-09-16 at 8.41.07 am

Screen Shot 2020-09-16 at 8.41.36 am

Note I’ve tried all kinds of formats in the ‘key’ to stop this from happening, not just the one in the above image.

The newImage1 variable contains the full path like /public/user-avatar/1111_thumbnail_255x255.png. This is needed for the path in the Put File step, but using it as key will generate the whole folder structure also on your S3. The starting / causes the folder without a name, in it there is a folder public and in there the folder user-avatar and finally in that folder is the image file.

1 Like