Новые upload-методы

This commit is contained in:
Book Pauk
2022-07-15 00:45:09 +07:00
parent c7a17b0a76
commit 091ca521ef
2 changed files with 16 additions and 1 deletions

View File

@@ -232,6 +232,14 @@ class ReaderWorker {
return `disk://${hash}`;
}
async uploadFileTouch(url) {
const outFilename = `${this.config.uploadDir}/${url.replace('disk://', '')}`;
await utils.touchFile(outFilename);
return url;
}
async restoreRemoteFile(filename) {
const basename = path.basename(filename);
const targetName = `${this.config.tempPublicDir}/${basename}`;