You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When initialising the uploader, the url does not support GET-parameters like so:
uploader = new ss.SimpleUpload({
button: 'UploadButton', // HTML element used as upload button
url: 'myfilepage.php?action=mydispatcher', // URL of server-side upload handler
name: 'uploadfile' // Parameter name of the uploaded file
});
The reason is that in the method _uploadXhr the queryURL always adds a '?' between the settings.url and ss.obj2string( params );.
Because the obj2string takes place on the fly, you also can't 'hack' the name param on init becuase it will treat the whole string as a the get-param i.e.:
name: 'myparam=test&uploadfile'
Thanks for bringing this up. This is a good catch, I've never had to add GET params to the URL, so it's never crossed my mind before. Let me try this out and do some testing, but it's definitely something that will be added to the plugin.
When initialising the uploader, the url does not support GET-parameters like so:
The reason is that in the method _uploadXhr the queryURL always adds a '?' between the settings.url and ss.obj2string( params );.
Because the obj2string takes place on the fly, you also can't 'hack' the name param on init becuase it will treat the whole string as a the get-param i.e.:
name: 'myparam=test&uploadfile'
The fix is easy, albeit a bit crude:
Didn't bother to do a pull-request, as you guys might want to tweak the regexp.
The text was updated successfully, but these errors were encountered: