在Ruby on Rails中上传文件 [英] Uploading files in Ruby on Rails
问题描述
我有一个Web应用程序需要从用户上传文件并将其上传到远程服务器。我可以通过file_field从用户输入到服务器,但似乎无法解决从服务器上传到远程的下一步。 Net :: HTTP并不是开箱即用的多部分表单,我还找不到另一个好的解决方案。我需要的东西,将允许我从用户 - >服务器 - >远程,而不是去用户 - >远程。任何人都可以成功做到这一点?
我相信attachment_fu插件可以做到这一点:$ b
$ b
http://svn.techno-weenie.net/ projects / plugins / attachment_fu /
I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms out of the box, and I haven't been able to find another good solution. I need something that will allow me to go from user -> server -> remote instead of going user -> remote. Anyone succeeded in doing this before?
I believe the attachment_fu plugin would allow for this:
http://svn.techno-weenie.net/projects/plugins/attachment_fu/
这篇关于在Ruby on Rails中上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!