Hi,
I'm using valum's file uploader with a WebKit browser (I'm incorporating the uploader into a jqtouch application to run on the iPhone and Android, hence the WebKit browser).
Every time I try to upload a file, I keep getting a javascript alert error "File is empty".
It works perfectly fine on Firefox.
The permissions are fine and I'm well within the PHP time limits and PHP file size limit.
I've probed the php file and the line ~123:
$size = $this->file->getSize();
does indeed return a file size of zero? ;(
I'm wondering is it something to do with the octet-stream?
Or something to do with XMLHttpRequest in Webkit?
I'm testing the uploader on Gnome Webkit Browser (2.30.2). I also use an Android simulator (2.2) which also gives the upload errors.
I'm guessing there might be an issue with some of this code (fileuploader.js):
// build query string
params = params || {};
params['qqfile'] = name;
var queryString = qq.obj2url(params, this._options.action);
xhr.open("POST", queryString, true);
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
xhr.setRequestHeader("Content-Type", "application/octet-stream");
xhr.send(file);
??
Any comments much appreciated.
Many thanks in advance,
Update: it works in Chrome 6.0.472.62 (59676), Ubuntu 10.04.
It would be really nice to get to the bottom of all this... i.e. it would be nice to know what browser deficiency in Gnome Web Browser is causing the errors...