File name when using #download on UploadedFile


For my use case, I’m downloading a document, and save it a new location. The code is something like:

original_document =

client.update(original_document: original_document)

In this scenario, the uploaded document contains “shrine” because it create a tempfile (see lib/shrine/uploaded_file.rb#L121)

Later, when I generate an URL for this new file, it generates a link with the name of the tempfile. I tried to use #to_io, but then there’s no filename

Do you have any solution for that?

I’m doing something similar and running into the same issue, did you have any luck finding a solution?