Displaying 1 result from an estimated 1 matches for "email_upload".
2011 Jul 13
0
RestClient posting multipart issue - RestClient::Found Exception: 302 Found
...lass_eval
{ attr_accessor :original_filename, :content_type }
file.original_filename = part.filename
file.content_type = part.mime_type
# then adding some parameters
fields_hash = {:clip => {:description => "uploaded file", :name =>
''test'', :file => file }, :email_upload => true}
# setting the url => "http://localhost:3000/en_GB/users/clips"
@url = "http://#{Rails.configuration.host}/#{locale}/users/clips"
# and finally sending the request
response = RestClient.post @url , fields_hash
and I get RestClient::Found Exception: 302 Found...