Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: Ajaxfileupload_uploadcomplete not firing [27701]

$
0
0
Hello,

I am having problem with ajaxfileupload control not triggering the uploadcomplete event. I am handling the upload button through an on click of another button.

AddButton.Attributes.Add("onClick", "$('.ajax__fileupload_uploadbutton').trigger('click');")

This fires the upload button but it doesn't fire the uploadcomplete event. My web.config has been set correctly. See attached file.

I am hosting this through godaddy and have see full access to the httpdocs folder. This is working locally but not on godaddy.

Please need your expert advise on this. Thanks!

Sincerely,
Derrick
Comments: Hello everyone, Just an update, the error seems to be on the doneAndUploadNextFile event as it throws error "error raising upload complete event and start new upload." Hope you can help me on this as I have already included all required handlers in web.config but ajaxfileupload still fails on godaddy. Locally, it is working as expected. doneAndUploadNextFile: function (fileItem) { /// <summary> /// Mark fileItem as uploaded, and upload next file in queue. /// </summary> /// <param name="fileItem">Uploaded File</param> // send message to server to finalize this upload var xhr = new XMLHttpRequest(), self = this; xhr.open("POST", "?contextKey="+ this._contextKey +"&done=1&guid=" + fileItem._id, true); xhr.onreadystatechange = function (e) { if (xhr.readyState == 4) { if (xhr.status == 200) { // Mark as done and invoke event handler self.raiseUploadComplete(Sys.Serialization.JavaScriptSerializer.deserialize(xhr.responseText)); // Upload next file self._processor.startUpload(); } else { // finalizing is error. next file will not be uploaded. self.setFileStatus(fileItem, 'error', Sys.Extended.UI.Resources.AjaxFileUpload_error); self.raiseUploadError(xhr); throw "error raising upload complete event and start new upload"; } } }; xhr.send(null); }

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>