Try fileRef.upload(request);
versus fileRef.upload(request, "uploadfile"); Fidel Viegas wrote: > > > Hello folks, > > I am experiencing a weird problem. I have the following code: > > var request:URLRequest = new > URLRequest("http://localhost:9090/docapp/upload.jsp > <http://localhost:9090/docapp/upload.jsp>"); > var urlVars:URLVariables = new URLVariables(); > urlVars.section_id = imageSection.selectedItem != null ? > imageSection.selectedItem.id : -1; > urlVars.title = imageTitle != null ? imageTitle.text : ''; > > request.data = urlVars; > request.method = URLRequestMethod.POST; > fileRef.upload(request, "uploadfile"); > > The before executing this code I have called the browse method to > select the file. Now, the weird part is that the above code will only > send the file. Here is an excerpt of what it is sending grabbed using > tcpmon: > > -------------------------------------------- begin excerpt > ---------------------------------------------------------- > POST /docapp/upload.jsp HTTP/1.1 > Host: localhost:9090 > Accept: */* > User-Agent: Shockwave Flash > Connection: Keep-Alive > Cache-Control: no-cache > Content-Length: 173137 > Expect: 100-continue > Content-Type: multipart/form-data; > boundary=----------------------------8b0c1ed199a5 > > ------------------------------8b0c1ed199a5 > Content-Disposition: form-data; name="Filename" > > firebirderror.png > ------------------------------8b0c1ed199a5 > Content-Disposition: form-data; name="Filedata"; > filename="firebirderror.png" > Content-Type: application/octet-stream > > �PNG > skipped image content > > ------------------------------8b0c1ed199a5 > Content-Disposition: form-data; name="Upload" > > Submit Query > ------------------------------8b0c1ed199a5-- > > -------------------------------------- end excerpt > ----------------------------------------------------- > > Now, if I change the send method to GET, I am, obviously, unable to > send the image file, but I am able to send a small text file and all > the parameters are sent in the query string. > > I am running my tests on Ubuntu 7.10 using Flex SDK 2.0 and the latest > flash player. > > Has anyone else experienced something similar to this? > > Thanks in advance, > > Fidel. > > -- Ben Marchbanks ::: alQemy ::: transforming information into intelligence http://www.alQemy.com ::: magazooms ::: digital magazines http://www.magazooms.com Greenville, SC 864.284.9918