Модель ..
def self.upload_client_document(params)
client_document = self.new :uploaded_data => params[:Filedata],:client_id => params[:client_id],:document_name => self.default_document_name,:document_description => self.default_description_name
client_document.rename_document_name
client_document.save!
# RAILS_ROOT + client_document.public_filename This will return path to file like
# C:/projects/test_project/client_documents/0000/0012/A100-bal.csv
RestClient.post 'http://demo.testltd.com/V12345/search.aspx?username=test1&password=test2',
:upload => File.new(RAILS_ROOT + client_document.public_filename)
end
Получение ошибки Errno :: ENOENT (Нет такого файла или каталога - C: /projects/test_project/client_documents/0000/0012/A100-bal.csv):
Но в папке есть файл ...
Есть идеи? В чем проблема с этим кодом?
Что-нибудь, что мне нужно изменить для отдыха клиента?