简体   繁体   中英

Rails: How can I edit text files stored on Amazon S3?

I'm using paperclip to upload some text/csv files to an S3 bucket.

I need to edit those files occasionally. How can I edit and re-save those?

Before using S3, I was just using File.open for saving the files, but that throws a "No such file or directory" error now.

File.open opens a file system object. To access S3 you need to connect to the S3 server and issue commands, such as GET.

There are some gems available from the Amazon developer's site which may help.

http://aws.amazon.com/ruby/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM