Just found something on Ruby on Rails Guides:
http://guides.rubyonrails.org/form_helpers.html#uploading-files
Especially this code part:
def upload
uploaded_io = params[:person][:picture]
File.open(Rails.root.join('public', 'uploads',
uploaded_io.original_filename), 'w') do |file|
file.write(uploaded_io.read)
end
end
Wouldn't you be able to, instead of file.write, transfer the files via
cURL?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment