Permalink
Browse files

Avoid XHRUploader loading

Avoid double error trigger
  • Loading branch information...
1 parent 994b2f6 commit 72092939ef506de4a2d8fbebccc9fbcab1f52ba3 @cdujeu cdujeu committed Sep 20, 2016
@@ -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);
@@ -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"/>

0 comments on commit 7209293

Please sign in to comment.