Shrine

File name when using #download on UploadedFile

Hi,

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

original_document = generated_document.document.download

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?