Add fileStorage config to frontend
closes #2956 - adds fileStorage to config passed to ember, and then grabs it in the relevant places.
This commit is contained in:
parent
9d4b40fd81
commit
a11fd67ec9
@ -22,7 +22,7 @@ var Markdown = Ember.Component.extend({
|
||||
|
||||
uploader.call(dropzones, {
|
||||
editor: true,
|
||||
filestorage: false
|
||||
fileStorage: this.get('config.fileStorage')
|
||||
});
|
||||
|
||||
dropzones.on('uploadstart', _.bind(this.sendAction, this, 'uploadStarted'));
|
||||
|
@ -6,8 +6,7 @@ var UploadModal = ModalDialog.extend({
|
||||
|
||||
didInsertElement: function () {
|
||||
this._super();
|
||||
var filestorage = $('#general').data('filestorage');
|
||||
upload.call(this.$('.js-drop-zone'), {fileStorage: filestorage});
|
||||
upload.call(this.$('.js-drop-zone'), {fileStorage: this.get('config.fileStorage')});
|
||||
},
|
||||
confirm: {
|
||||
reject: {
|
||||
|
@ -6,6 +6,7 @@ var ConfigInitializer = {
|
||||
|
||||
application.inject('route', 'config', 'ghost:config');
|
||||
application.inject('controller', 'config', 'ghost:config');
|
||||
application.inject('component', 'config', 'ghost:config');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -47,6 +47,7 @@ adminControllers = {
|
||||
var userData,
|
||||
// config we need on the frontend
|
||||
frontConfig = {
|
||||
fileStorage: config().fileStorage,
|
||||
apps: config().apps
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user