I have a Rails app which interacts with some mobile apps in various languages via an exposed API.
The mobile apps have to send video files to the Rails app but the size of the files is too large to send them directly to the API to attach with Paperclip.
I am uploading the files directly to S3 on the mobile devices and then sending the URL of the uploaded files to the API using a field which is not associated with a paperclip attachment.
At the point the Rails controller gets an create or update request that contains an upload_url value, I want to create a Paperclip attachment with the file at the location specified.
I know I can create a paperclip attachment by reading the file in from S3 and storing it back out again but this seems like a lot of unnecessary data being transferred when the start and end points are the same bucket on S3.
So my question is, can I somehow use the S3 gem to move or rename the file into being an attached file that Paperclip can recognise?