LPology / Simple-Ajax-Uploader

Javascript file upload plugin with progress bar support. Works in all major browsers, including IE7+, Chrome, Firefox, Safari, and Opera. No dependencies - use it with or without jQuery.
995 stars 267 forks source link

An invalid or illegal string was specified #126

Closed henrikheil closed 8 years ago

henrikheil commented 8 years ago

I'm not getting the standard example for single uploads to work.

The onSubmit-event is fired, but straight afterwards i'm getting the error message: An invalid or illegal string was specified

This points to the code:

if ( opts.encodeCustomHeaders && opts.customHeaders.hasOwnProperty( i ) ) {
    xhr.setRequestHeader( i, encodeURIComponent( headers[ i ] ) + '' );
} else {
    xhr.setRequestHeader( i, headers[ i ] + '' );
}

The Ajax Request doesn't get initiated at all.

Is this a known problem?

LPology commented 8 years ago

What is the file name of the file?

LPology commented 8 years ago

Fixed with version 2.3 Release. Closing out. Feel free to reopen or create another issue if you have any other issues.