Summary: | XMLHttpRequest Async Request onreadystate does not go past 1 when uploading a file | ||
---|---|---|---|
Product: | WebKit | Reporter: | Shiv Kumar <shivk> |
Component: | XML | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap, emacemac7, shivk |
Priority: | P2 | ||
Version: | 525.x (Safari 3.1) | ||
Hardware: | All | ||
OS: | All |
Description
Shiv Kumar
2008-07-05 01:24:38 PDT
Do you have an example of this problem? It's not clear what you mean by file upload - is it form submission? (In reply to comment #1) > Do you have an example of this problem? It's not clear what you mean by file > upload - is it form submission? Uploading a file using a form with enc-type set to multipart/form-data. Don't know how else to explain this. I'm uploading a file. So essentially, while I'm uploading a file (that is the file upload is in progress, I'm trying to make an asyc xmlHttp request. This does not work as expected (as explained previously). All this does work in other browsers. The synchronous version does work here as well but the async version does not work. Thanks! This is the same as bug 23933, which was filed later, but has somewhat more detail and a test case, so I'll mark this as a duplicate. A workaround in your case is to use XMLHttpRequest file upload instead of form submission. This is not supported in any Safari release yet, but is supported in Safari 4 beta. Untested pseudo-code: var fileInputElement = ... var file = fileInputElement.files[0]; // multiple files in one input element are supported var req = new XMLHttpRequest; req.open(...); req.send(file); *** This bug has been marked as a duplicate of 23933 *** |