[FIX] File had redirect delay when using external storage services and no option to proxy only avatars
parent
2e5d1877f0
commit
dd092f9e18
@ -0,0 +1,16 @@ |
||||
RocketChat.Migrations.add({ |
||||
version: 109, |
||||
up() { |
||||
const FileUpload_GoogleStorage_Proxy = (RocketChat.models.Settings.findOne({_id: 'FileUpload_GoogleStorage_Proxy'}) || {}).value === true; |
||||
const FileUpload_S3_Proxy = (RocketChat.models.Settings.findOne({_id: 'FileUpload_S3_Proxy'}) || {}).value === true; |
||||
|
||||
RocketChat.models.Settings.update({_id: 'FileUpload_GoogleStorage_Proxy_Avatars'}, {$set: {value: FileUpload_GoogleStorage_Proxy}}); |
||||
RocketChat.models.Settings.update({_id: 'FileUpload_GoogleStorage_Proxy_Uploads'}, {$set: {value: FileUpload_GoogleStorage_Proxy}}); |
||||
|
||||
RocketChat.models.Settings.update({_id: 'FileUpload_S3_Proxy_Avatars'}, {$set: {value: FileUpload_S3_Proxy}}); |
||||
RocketChat.models.Settings.update({_id: 'FileUpload_S3_Proxy_Uploads'}, {$set: {value: FileUpload_S3_Proxy}}); |
||||
|
||||
RocketChat.models.Settings.remove({_id: 'FileUpload_GoogleStorage_Proxy'}); |
||||
RocketChat.models.Settings.remove({_id: 'FileUpload_S3_Proxy'}); |
||||
} |
||||
}); |
||||
Loading…
Reference in new issue