mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 06:50:51 +00:00
Specify the right path
This commit is contained in:
parent
09193142aa
commit
f127c3a4a3
@ -217,7 +217,12 @@ class LocalStrapiDestinationProvider implements IDestinationProvider {
|
|||||||
|
|
||||||
async #removeAssetsBackup() {
|
async #removeAssetsBackup() {
|
||||||
if (strapi.config.get('plugin.upload').provider === 'local') {
|
if (strapi.config.get('plugin.upload').provider === 'local') {
|
||||||
await fse.rm(this.uploadsBackupDirectoryName, { recursive: true, force: true });
|
assertValidStrapi(this.strapi);
|
||||||
|
const backupDirectory = path.join(
|
||||||
|
this.strapi.dirs.static.public,
|
||||||
|
this.uploadsBackupDirectoryName
|
||||||
|
);
|
||||||
|
await fse.rm(backupDirectory, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +230,7 @@ class LocalStrapiDestinationProvider implements IDestinationProvider {
|
|||||||
async createAssetsWriteStream(): Promise<Writable> {
|
async createAssetsWriteStream(): Promise<Writable> {
|
||||||
assertValidStrapi(this.strapi, 'Not able to stream Assets');
|
assertValidStrapi(this.strapi, 'Not able to stream Assets');
|
||||||
|
|
||||||
const removeAssetsBackup = this.#removeAssetsBackup;
|
const removeAssetsBackup = this.#removeAssetsBackup.bind(this);
|
||||||
const strapi = this.strapi;
|
const strapi = this.strapi;
|
||||||
const transaction = this.transaction;
|
const transaction = this.transaction;
|
||||||
return new Writable({
|
return new Writable({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user