fix: stream assets from storage local locations (#2087)
This commit is contained in:
@@ -114,6 +114,9 @@ module.exports = {
|
||||
await sourceBlockBlobClient.delete({
|
||||
deleteSnapshots: 'include'
|
||||
})
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
},
|
||||
/**
|
||||
* HANDLERS
|
||||
|
@@ -19,5 +19,8 @@ module.exports = {
|
||||
},
|
||||
async renamed() {
|
||||
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -116,7 +116,9 @@ module.exports = {
|
||||
WIKI.logger.info(`(STORAGE/DISK) Renaming file from ${asset.path} to ${asset.destinationPath}...`)
|
||||
await fs.move(path.join(this.config.path, asset.path), path.join(this.config.path, asset.destinationPath), { overwrite: true })
|
||||
},
|
||||
|
||||
async getLocalLocation (asset) {
|
||||
return path.join(this.config.path, asset.path)
|
||||
},
|
||||
/**
|
||||
* HANDLERS
|
||||
*/
|
||||
|
@@ -19,5 +19,8 @@ module.exports = {
|
||||
},
|
||||
async renamed() {
|
||||
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -19,5 +19,8 @@ module.exports = {
|
||||
},
|
||||
async renamed() {
|
||||
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -363,6 +363,9 @@ module.exports = {
|
||||
'--author': `"${asset.moveAuthorName} <${asset.moveAuthorEmail}>"`
|
||||
})
|
||||
},
|
||||
async getLocalLocation (asset) {
|
||||
return path.join(this.repoPath, asset.path)
|
||||
},
|
||||
/**
|
||||
* HANDLERS
|
||||
*/
|
||||
|
@@ -19,5 +19,8 @@ module.exports = {
|
||||
},
|
||||
async renamed() {
|
||||
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -119,6 +119,9 @@ module.exports = class S3CompatibleStorage {
|
||||
WIKI.logger.info(`(STORAGE/${this.storageName}) Renaming file from ${asset.path} to ${asset.destinationPath}...`)
|
||||
await this.s3.copyObject({ CopySource: asset.path, Key: asset.destinationPath }).promise()
|
||||
await this.s3.deleteObject({ Key: asset.path }).promise()
|
||||
}
|
||||
async getLocalLocation () {
|
||||
|
||||
}
|
||||
/**
|
||||
* HANDLERS
|
||||
|
@@ -103,6 +103,9 @@ module.exports = {
|
||||
WIKI.logger.info(`(STORAGE/SFTP) Renaming file from ${asset.path} to ${asset.destinationPath}...`)
|
||||
await this.ensureDirectory(asset.destinationPath)
|
||||
await this.sftp.rename(path.posix.join(this.config.basePath, asset.path), path.posix.join(this.config.basePath, asset.destinationPath))
|
||||
},
|
||||
async getLocalLocation () {
|
||||
|
||||
},
|
||||
/**
|
||||
* HANDLERS
|
||||
|
Reference in New Issue
Block a user