You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
Mason Stewart edited this page Feb 4, 2018
·
6 revisions
There are times when you want the user to give you a URL to fetch an attachment from instead of physically uploading it in a multipart form. This is a common enough use case but there are many others which are similar. You need to fetch content from a URL and attach to paperclip. While this was fairly easy earlier, with paperclip (>= 3.1.4) it's become even easier.
Assuming you've already ran paperclip migration for your user model you can now
For this to work, make sure that you've registered the URI adapter, which is not registered by default. Enable it by adding Paperclip::UriAdapter.register to config/initializers/paperclip.rb. Further details are in the IO Adapters section of the README.