PDA

View Full Version : Upload FileReference Bug


Neoarttec
01-07-2006, 01:46 AM
Thought you might be interested to know about a bug in Flash that I've
discovered. After wasting many hours. :mad:

The Flash upload changes the file type headers on the http transfer. The
images arrive sure enough. But I couldn't figure out why my script was
rejecting the images. Unitl I notice that it sends the files as a
"application/octet-stream" instead of a "image/jpeg" for instance. That is
very nasty for your serverside scripts which are expecting a certain type of
file, but Flash changes the headers. :(

http://www.guildmedia.net

HBB Alfred
04-04-2006, 08:44 AM
yes, i have encounter the same question

Jotun75
04-04-2006, 01:47 PM
This is text from flash helpfile on the subject filereference.upload.

"The file is uploaded to the URL passed in the url parameter. The URL must be a server script configured to accept uploads. Flash Player uploads files using the HTTP POST method. The server script that handles the upload should expect a POST request with the following elements:

A Content-Type element of multipart/form-data
A Content-Disposition element with a name attribute set to "Filedata" and a filename attribute set to the name of the original file
The binary contents of the file
Here is a sample POST request:

Content-Type: multipart/form-data; boundary=AaB03x
--AaB03x
Content-Disposition: form-data; name="Filedata"; filename="example.jpg"
Content-Type: application/octet-stream
... contents of example.jpg ...
--AaB03x-- "