I have a rails 3.2 app. Using fog to store files in S3.
I would like to write a script to rename all of the files that have been uploaded. I can't seem to find any fog documentation in this area.
Is this possible with fog? Do I need another gem?
I have a rails 3.2 app. Using fog to store files in S3.
I would like to write a script to rename all of the files that have been uploaded. I can't seem to find any fog documentation in this area.
Is this possible with fog? Do I need another gem?
The bad news is you need to do a get/create/destroy
The good news is if you're doing it from ec2 in the same region it will probably happen as fast as renaming a file on your local computer
What about copying as mentioned in this post? cf. fog's requests sources and fog's models sources.
You should be able to do:
or
Destroying the original file after a successful copy remains necessary though.