I've uploaded and encrypted two images to my app, and now I need to use them in an img_tag
. How can I retrieve the contents of this string and display them to the user?
Model.document_front: <ActionDispatch::Http::UploadedFile:0x007f91fc5c88d0>
I've uploaded and encrypted two images to my app, and now I need to use them in an img_tag
. How can I retrieve the contents of this string and display them to the user?
Model.document_front: <ActionDispatch::Http::UploadedFile:0x007f91fc5c88d0>
You should be able to use the path
method: https://api.rubyonrails.org/v6.0.0/classes/ActionDispatch/Http/UploadedFile.html#method-i-path
More information here:
https://www.reddit.com/r/rails/comments/8nqssd/actiondispatchhttpuploadedfile/