arrancscott is looking for a way to get the S3 URL for files uploaded to S3 on the Ruby side. They have a partial that loops through a list of filenames and want to display the corresponding images from S3.
zogstrip asked how the filenames array is generated, and arrancscott explained that it comes from a filenames table belonging to a User. They managed to solve the issue by adding an upload_id column to the table and using Upload.find_by to retrieve the S3 URL.
zogstrip confirmed that this approach is correct and should work without any issues.
The filenames table stores filenames for images uploaded to a users slideshow.
I’ve managed to solve this by adding an upload_id column to my table, and when creating the upload with Upload.create_for I set the upload_id manually in the filenames table. This way I can find the upload using the Upload.find_by method and get the URL for the upload.
Seems to work ok, happy to be told if there will be an issue doing it this way.