I'm working on a project that uploads some files to my server (all local still, so nothing live). I'm using JQuery for a lightbox feature, so I thought I'd try using the JQuery file upload addon posted here:
Everything is working great, though I notice certain types of files (for example wmv) are causing the upload plugin to fail and popup an error, and I'm not sure why. I've tracked it down to this snippet of code however:
More specifically, I believe I can't imagine this is anything else but the call:
status = isTimeout != "timeout" ? "success" : "error";
// Make sure that the request was successful or notmodified
if ( status != "error" )
// process the data (runs the xml through httpData regardless of callback)
var data = jQuery.uploadHttpData( xml, s.dataType );
// If a local callback was specified, fire it and pass it the data
if ( s.success )
s.success( data, status );
// Fire the global callback
if( s.global )
jQuery.event.trigger( "ajaxSuccess", [xml, s] );
jQuery.handleError(s, xml, status);
status = "error";
jQuery.handleError(s, xml, status, e);
The exact error I'm getting is:
jQuery.uploadHttpData( xml, s.dataType );
"SyntaxError: Unexpected token <"
Any thoughts on what could cause that? Do I maybe have a version mis-match between my jquery, and the jquery that this upload tool expects? That's my only real guess.
Edit: I'm using JQuery 1.2.3 according to the header in my jquery.js file.