Reputation: 21
I have trouble with uploading file using brick_ftp gem I am using dropzone.js for front end. This is my source code for uploading
BrickFTP::API::FileOperation::Upload.create(:path =>
params[:file].original_filename, :source => params[:file])
Dropzone.js
is working well.
It is uploading 0 kb
of same name file to brick ftp.
I think the main problem is with source parameter.
Please help me if anyone knows about it. :)
Upvotes: 1
Views: 129
Reputation: 21
I have solved this problem myself like this.
BrickFTP::API::FileOperation::Upload.create(:path =>
params[:file].original_filename, :source => params[:file].tempfile.to_io)
It is working very well.
Upvotes: 1