Permalink
Browse files

Upload Configs : make sure options are reloaded on repository switch

  • Loading branch information...
1 parent 3e8328d commit fada3e7db68b736088e0e3dde1397289b7bbfca5 @cdujeu cdujeu committed Sep 29, 2016
Showing with 12 additions and 3 deletions.
  1. +12 −3 core/src/plugins/uploader.html/js/react/UploaderModel.js
@@ -553,9 +553,17 @@
constructor(){
super();
- this._global = global.pydio.getPluginConfigs("uploader");
- this._mq = global.pydio.getPluginConfigs("mq");
- this._user = global.pydio.user.preferences;
+ pydio.observe("registry_loaded", function(){
+ this._global = null;
+ this._mq = null;
+ }.bind(this));
+ }
+
+ _loadOptions(){
+ if(!this._global){
+ this._global = global.pydio.getPluginConfigs("uploader");
+ this._mq = global.pydio.getPluginConfigs("mq");
+ }
}
getOptionAsBool(name, userPref = '', defaultValue = undefined){
@@ -564,6 +572,7 @@
}
getOption(name, userPref = '', defaultValue = undefined){
+ this._loadOptions();
if(userPref){
let test = this.getUserPreference('originalUploadForm_XHRUploader', userPref);
if(test !== undefined && test !== null) return test;

0 comments on commit fada3e7

Please sign in to comment.