Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Avoid XHRUploader loading
Browse files Browse the repository at this point in the history
Avoid double error trigger
  • Loading branch information
cdujeu committed Sep 20, 2016
1 parent 994b2f6 commit 7209293
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions core/src/plugins/gui.ajax/res/js/es6/http/PydioApi.es6
Expand Up @@ -101,9 +101,11 @@ class PydioApi{
}

if(window.Connexion){

// Warning, avoid double error
let errorSent = false;
let localError = function(xhr){
onError('Request failed with status :' + xhr.status);
if(!errorSent) onError('Request failed with status :' + xhr.status);
errorSent = true;
};
var c = new Connexion();
return c.uploadFile(file, fileParameterName, uploadUrl, onComplete, localError, onProgress, xhrSettings);
Expand Down
1 change: 0 additions & 1 deletion core/src/plugins/uploader.html/manifest.xml
Expand Up @@ -9,7 +9,6 @@
<client_settings>
<resources>
<js file="plugins/uploader.html/class.MultiUploader.js" className="MultiUploader"/>
<js file="plugins/uploader.html/class.XHRUploader.js" className="XHRUploader"/>
<js file="plugins/uploader.html/js/build/UploaderView.js" className="UploaderView" depends="React,PydioForm,UploaderModel"/>
<js file="plugins/uploader.html/js/build/UploaderModel.js" className="UploaderModel"/>
<js file="plugins/uploader.html/js/build/UploaderGlobalListener.js" className="UploaderGlobalListener"/>
Expand Down

0 comments on commit 7209293

Please sign in to comment.