How to store file URL & Name in DB while using DO Spaces

Hello All,

I am working with S3 to upload files. I am able to upload files to the bucket.
I am struggling with storing the image URLs/ path in the DB table.
Requesting your help in understanding the solution to save the uploaded file URL/path.

I will explain the steps I am taken to upload the files to DO Spaces:

  1. Included the S3 Provider
    image

  2. File Upload step

  1. Repeat Step as I am using Multi File Upload
    image

  2. Put File: The 'name' in Key field & 'path' in Path field are linked from the Repeat Step

  3. DB Insert: This inserts record, however it saves the server path & name.

Hi AJ,

path corresponds to the directory path on the local/remote server where original file is saved. When uploading document to S3, it will look for the source file in this path/location.

If you are using S3 to store images or documents, then you need url of the file saved in the S3 bucket. The value of Key in the S3 Put File properties corresponds to the url value when downloading / displaying files and images.

Ok, i got the point you explained here.
How to get the key in the S3 Put File so that I can save it in the DB?
I tried everything that I have learned so far, however, I am unable to find the key parameter to pass in the DB insert step.

Can you help me with that?

Key value used in the S3 Put File Properties is the url value to store in the DB.

When inserting value of url in the table, in the dynamic picker, copy and paste the value of Key from the S3 Put File Properties. An example below. Replace the value with your Key value.

It may be easier to add a Set Value step before the S3 Put File step and set its value with the value of Key. Then Set Value step name can be used in S3 Put File and DB insert steps.

Thank you very much @guptast for your help. :slightly_smiling_face:
The solution is working & now I can store the image URLs in the DB.

1 Like

You are welcome, @miu. I'm glad it is working for you as required. :slight_smile: