This is exactly what I've been trying to do all day. Not as easy as you'd think. There are absolutely no examples of this available anywhere.
It's a wonder that people haven't been trying to do this for a while 'cause it has many different uses, like streaming data directly through the 80 port when all other ports are blocked. B On May 11, 12:39 pm, Frederick Cheung <frederick.che...@gmail.com> wrote: > On May 11, 11:11 am, "hongseok.com" <hongseok.y...@gmail.com> wrote:> I just > want the client(kind a application running automatically) to > >uploadfileto the web server as it wants. > > > How do I do this? > > you'll need to construct an appropriate post request (read up on > multipart post requests) containing thefile > > Fred > > > On 5월11일, 오후5시53분, Frederick Cheung <frederick.che...@gmail.com> > > wrote: > > > > On May 11, 7:52 am, "hongseok.com" <hongseok.y...@gmail.com> wrote: > > > > > I want touploadfileusing get method. > > > > for example, "http://www.mydomain.com/upload?file=c:\test.exe"upload > > > > my localfileto the remote server. > > > > I found one useful link aboutfileuploading > > > > here(http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm). > > > > Even I've changed some code in order to fit my rails version, it > > > > worked well. But the problem is I have use <form> tag. > > > > > I don't know how [view] make UploadedFile and pass it to [controller] > > > > and I tried to find how create UploadedFile. But failed :( > > > > > Anyway, how can Iuploadmy localfileusing above styleurl? > > > > If you want to just pass the path of thefilethat won't work - the > > >fileneeds to be part of the request body. In theory get requests can > > > have a request body, but certainly in browser land this isn't common. > > > it might just work if you set the form's method to get (don't forget > > > to make the form multipart). > > > Why is this important ? > > > > Fred > > > > > help me plz, thx --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---