S3 Upload - How Do I Create and Record a Unique Uploaded Filename With AWS S3

I’d love to hear what the folks at Wappler think is the best methodology with S3 to achieve what I wish to do…

The user experience I need for a multi-user app is:

  1. The user uploads a file which is to be stored in my AWS S3 bucket.
  2. During the process, the file is given a unique name such as hUbdgU7hdGF.jpg
  3. In a database of filenames, I record the exact path to their file, which they can they link to when they send emails from within my app… so a path like mys3bucket.amazonsurl.com/hUbdgU7hdGF.jpg

I’ve never really worked with files in Wappler before, so am starting from a “file newbie” perspective. Was waiting for the S3 moment to start!

So from what I can see, it looks like I’ll need to do something like this:

  1. Upload the file (say my_image.jpg) to the server.
  2. Rename the file on the server to xyz.jpg
  3. Upload the file from the server to S3.
  4. Store the filename in my database as mys3bucket.amazonsurl.com/xyz.jpg

In which case I won’t be using App Connect S3, but I’ll be using Server Connect S3.

Is this the best way to achieve what I am looking for?

Best wishes,
Antony.

Community Page
Last updated: