diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js
index c102c6eb..06c9ceba 100644
--- a/src/store/modules/settings.js
+++ b/src/store/modules/settings.js
@@ -95,6 +95,9 @@ const settings = {
if (key === 'Pleroma.Emails.Mailer' && input === ':adapter') {
const subkeys = Object.keys(state.settings[group][key]).filter(el => el !== ':adapter')
await removeSettings([{ group, key, delete: true, subkeys }], getters.authHost, getters.token)
+ } else if (key === 'Pleroma.Upload' && input === ':uploader') {
+ const deletedKey = value === 'Pleroma.Uploaders.Local' ? 'Pleroma.Uploaders.S3' : 'Pleroma.Uploaders.Local'
+ await removeSettings([{ group, key: deletedKey, delete: true }], getters.authHost, getters.token)
}
key
? commit('UPDATE_STATE', { group, key, input, value })
diff --git a/src/views/settings/components/Upload.vue b/src/views/settings/components/Upload.vue
index 0d4d5a21..a9a57619 100644
--- a/src/views/settings/components/Upload.vue
+++ b/src/views/settings/components/Upload.vue
@@ -3,14 +3,17 @@
-
+
+
+ Pleroma.Uploaders.Local
+
+
-
-
+
+
-
@@ -46,6 +49,14 @@ export default {
loading() {
return this.settings.loading
},
+ showUploadersS3() {
+ const uploader = _.get(this.settings.settings, [':pleroma', 'Pleroma.Upload', ':uploader'])
+ return uploader === 'Pleroma.Uploaders.S3'
+ },
+ showUploadersLocal() {
+ const uploader = _.get(this.settings.settings, [':pleroma', 'Pleroma.Upload', ':uploader'])
+ return uploader === 'Pleroma.Uploaders.Local'
+ },
upload() {
return this.settings.description.find(setting => setting.key === 'Pleroma.Upload')
},