# Use Rails to upload with net::ftp instead of html

**URL:** <https://www.ruby-forum.com/t/use-rails-to-upload-with-net-ftp-instead-of-html/127461>\
**Category:** Rails\
**Created:** [January 29, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/use-rails-to-upload-with-net-ftp-instead-of-html/127461 "2008-01-29T14:49:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripdragon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tripdragon](https://www.ruby-forum.com/u/tripdragon)\
**Post date:** [January 29, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/use-rails-to-upload-with-net-ftp-instead-of-html/127461/1 "2008-01-29T14:49:59Z")

</div>

I have this uploader that was working just fine with html file\_field  
and File.open  
But now I have to large of files to send so I am having to resort to  
other means and can not use attachment\_fu yet

So the portion of my model has this code in it  
#Model  
ftp.putbinaryfile(self.path, self.name, 1024)  
But that does not work and  
ftp.putbinaryfile(self.temp\_path, self.name, 1024)  
Reports that I have no file name so and so If it is not the the  
uploaded path already .

I need to get the file and path via the browser Client side and upload  
it to the server with the ftp data already in the model

And Please do not tell me net/ftp and rails can’t do this cause I  
swear I will throw a ruby sized bolder through my code books if it  
can’t . :😃

On that I did read through the past posts here but saw no answers.

---

<div class="post-metadata">

**Author:** ![tripdragon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tripdragon](https://www.ruby-forum.com/u/tripdragon)\
**Post date:** [January 29, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/use-rails-to-upload-with-net-ftp-instead-of-html/127461/2 "2008-01-29T20:56:41Z")

</div>

Is their anything I can add to this to perhaps make it a bit clearer  
in the explanation?  
Or maybe a book that might cover this portion as a recipe?
