|
|
@ -79,7 +79,6 @@ exports.create = (req, res, next) => { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
exports.update = (req, res, next) => { |
|
|
|
exports.update = (req, res, next) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
console.log(cdnConfig.uri, storageConfig.uri); |
|
|
|
|
|
|
|
const oldPath = req.body.oldPath.replace(cdnConfig.uri, storageConfig.uri); |
|
|
|
const oldPath = req.body.oldPath.replace(cdnConfig.uri, storageConfig.uri); |
|
|
|
const newPath = req.body.newPath.replace(cdnConfig.uri, storageConfig.uri); |
|
|
|
const newPath = req.body.newPath.replace(cdnConfig.uri, storageConfig.uri); |
|
|
|
|
|
|
|
|
|
|
@ -132,7 +131,7 @@ exports.download = (req, res, next) => { |
|
|
|
archive.pipe(output); |
|
|
|
archive.pipe(output); |
|
|
|
if (req.body.data) { |
|
|
|
if (req.body.data) { |
|
|
|
req.body.data.forEach((e) => { |
|
|
|
req.body.data.forEach((e) => { |
|
|
|
const path = e.path.replace(cdnConfig.uri, storageConfig.uri); |
|
|
|
const path = e.path.replace(cdnConfig.uri, storageConfig.uri).replace(/ /g, '%20'); |
|
|
|
if (e.isFolder) { |
|
|
|
if (e.isFolder) { |
|
|
|
archive.directory(path, e.name); |
|
|
|
archive.directory(path, e.name); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|