feat: azure blob storage provider + s3 rename fix

This commit is contained in:
NGPixel
2019-12-23 00:12:19 -05:00
parent 14c842ff9d
commit 4a2f1d045b
5 changed files with 283 additions and 17 deletions

View File

@@ -57,8 +57,8 @@ module.exports = class S3CompatibleStorage {
}
async renamed(page) {
WIKI.logger.info(`(STORAGE/${this.storageName}) Renaming file ${page.path} to ${page.destinationPath}...`)
let sourceFilePath = `${page.path}.${page.getFileExtension()}`
let destinationFilePath = `${page.destinationPath}.${page.getFileExtension()}`
let sourceFilePath = getFilePath(page, 'path')
let destinationFilePath = getFilePath(page, 'destinationPath')
if (WIKI.config.lang.namespacing) {
if (WIKI.config.lang.code !== page.localeCode) {
sourceFilePath = `${page.localeCode}/${sourceFilePath}`