В работе

Multipart date post file (txt) in ruby on rails app


I'm building a website for the management of an hotel.

I'm trying to post a txt file to an external server (police), but i'm a beginner so need some help.

The file (which i generate) have to be send to a server with the following caracteristic:





the url is : https://usuario:contrase%C3%B1a@[url removed, login to view]

usuario is ID

and contrase is Password

So far i've written this using multipart but nothing it coming through:

require 'net/http/post/multipart'

url = [url removed, login to view]("https://" + username + ":" + password + "@[url removed, login to view]")

[url removed, login to view](filep) do |jpg|

req = Net::HTTP::Post::[url removed, login to view] [url removed, login to view], "file" => [url removed, login to view](jpg, "file", "document")

http = Net::[url removed, login to view]([url removed, login to view], [url removed, login to view])

http.use_ssl = ([url removed, login to view] == "https")

response = [url removed, login to view](req)

redirect_to account_path

flash[:notice] = "data send to police"




Let me know if you can help me :)

Thanks in advance

Квалификация: Ruby on Rails

Показать больше i need someone to search for movie names through a website visit the link get the embed code and submit it on my website i need , webcam view ruby rails app, jquery file upload ruby rails, ruby on rails upload image, rails multipart/form-data, ruby on rails file upload example, uploading-images-to-a-rails-app-via-json-api, rails 5 upload file, rails api file upload, upload image in ruby on rails example, rails api multipart, file upload ruby rails, move ruby rails app linux server, ruby rails app android, large file upload ruby rails, create save file xls ruby rails, iphone post rails app, ruby rails post test, ruby rails app sample message board, ruby rails app iphone

О работодателе:
( 0 отзыв(-а, -ов) ) Malaga, Spain

ID проекта: #15774010

3 фрилансеров(-а) в среднем готовы выполнить эту работу за €31


Hello, I have gone through your proposal, i can help you, please ping me so we can discuss over chat. I am a skilled and experienced Developer having 7+ years of experience in ROR Web Development, Front-end Devel Больше

€30 EUR за 1 день
(11 отзывов(-а))
€34 EUR за 1 день
(0 отзывов(-а))

I am an long time ruby on rails developer. That is my every day job and its very familiar to me. I can do it very quickly.

€28 EUR за 1 день
(0 отзывов(-а))