From: Ross Shaw Date: 2003-01-14T21:54:16+09:00 Subject: Re: Doesn't anyone do file uploads via html? In article <20030113083643.A85719@freeze.org>, Jim Freeze wrote: > Hi: > > I have searched the archives and posted this message three times > and have yet to get a response. I am trying to create a web page > that let's a user upload a file. > > I have worked through most of the issues, and can even get > a file on to my server, but it is embedded in a binary file > whose format is unknown. > > Has anyone experience with this, or is there documentation on > how to extract the file data from what is sent to the server? > I did this several years ago using Java. Got it working OK. IIRC it should come back in a multipart MIME body. I think this is described in rfc1867 [1]. However this does not appear to be the format that you are getting in your file. You might need to dig around in the webrick code to see how it is reading the actual HTML stream. Also it might be worth trying to upload a .txt file as it might have something to do with it not recognizing how to encode .rb file. Good luck Ross 1. http://www.ietf.org/rfc/rfc1867.txt