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.