开发者

Solution for offloading user-uploaded files to an external site?

For a site I'm working on, I want users to be able to upload songs that others can listen to. The Rails application wi开发者_运维问答ll be hosted on a Linode VPS, but I'd like to host the actual songs files somewhere other than the VPS, possibly a Dreamhost or Amazon S3 account.

What do you guys think a good solution for this would be? Allow the users to upload to the VPS, then have the VPS ftp or otherwise transfer the file to the external hosting service in the background, and notify the user when it is complete? Or some other crazy, cool solution?

Any help is much appreciated.


I built a sample project which uploads to Amazon S3 and bypasses your Rails server entirely. I would recommend using that kind of solution so you don't tie up your Rails server process with the upload.

Sample project using Rails 3, Flash/Silverlight/GoogleGears/BrowserPlus and jQuery-based Plupload to upload directly to S3: https://github.com/iwasrobbed/Rails3-S3-Uploader-Plupload

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜