Avg. Rating 4.5

Problem

In Firefox, FileReference.upload() does not send cookies along. Why is this? What can be done to solve this?

Solution

Session information such as cookies is not preserved when Flash does a FileReference.upload() in Firefox. Cookie information has to be inserted manually.

Detailed explanation

The advantage of FileReference.upload() over a normal browser file upload is progress. Only this method gives you progress information about the status of upload. The potential disadvantage of this is two fold:

1. A FileReference.upload() currently does not use the same cookies as your browser session if you are using Firefox (on Windows). In such cases, cookie information has to be inserted manually.

2. Your web server should not reject partial POST requests. For example, a rule in mod_security enabled on Apache web server may cause your server to reject the POST that flash does when you call FileReference.upload(). In such cases, the web server will respond with HTTP status 406.
 

Report abuse

Related recipes