Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading files in Ruby on Rails

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?

like image 903
Misplaced Avatar asked Sep 22 '08 17:09

Misplaced


People also ask

How do I upload a file to Web development?

HTML allows you to add the file upload functionality to your website by adding a file upload button to your webpage with the help of the <input> tag. The <input type=”file”> defines a file-select field and a “Browse“ button for file uploads.

How do I upload a file to a server?

Right-click the folder and select “Upload other file here. . .“. Browse the server for the file you want to upload. Select the file and click Open. Now, you will see the file in the folder location on the server.


1 Answers

I believe the attachment_fu plugin would allow for this:

http://svn.techno-weenie.net/projects/plugins/attachment_fu/

like image 169
NickR Avatar answered Nov 08 '22 20:11

NickR