Fixed uuid import. Changed fs rmdir to rm.
This commit is contained in:
parent
e0908a5f5e
commit
98c103c625
|
@ -7,7 +7,7 @@ const fs = require('fs');
|
|||
const fsPromises = require('fs').promises;
|
||||
const path = require('path');
|
||||
const stream = require('stream');
|
||||
const nanoid = require('nanoid/non-secure');
|
||||
const { nanoid } = require('nanoid/non-secure');
|
||||
const mime = require('mime');
|
||||
// const fileType = require('file-type');
|
||||
const ffmpeg = require('fluent-ffmpeg');
|
||||
|
@ -948,7 +948,7 @@ async function flushOrphanedMedia() {
|
|||
await deleteS3Objects(orphanedMedia.filter((media) => media.is_s3));
|
||||
}
|
||||
|
||||
await fsPromises.rmdir(path.join(config.media.path, 'temp'), { recursive: true });
|
||||
await fsPromises.rm(path.join(config.media.path, 'temp'), { recursive: true });
|
||||
|
||||
logger.info('Cleared temporary media directory');
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const config = require('config');
|
||||
const faker = require('faker');
|
||||
const nanoid = require('nanoid');
|
||||
const { nanoid } = require('nanoid');
|
||||
const moment = require('moment');
|
||||
|
||||
const knex = require('../knex');
|
||||
|
|
|
@ -6,7 +6,7 @@ const fsPromises = require('fs').promises;
|
|||
const Promise = require('bluebird');
|
||||
const blake2 = require('blake2');
|
||||
const sharp = require('sharp');
|
||||
const nanoid = require('nanoid');
|
||||
const { nanoid } = require('nanoid');
|
||||
const { PassThrough } = require('stream');
|
||||
|
||||
const http = require('./http');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const config = require('config');
|
||||
const AWS = require('aws-sdk');
|
||||
const fs = require('fs');
|
||||
const nanoid = require('nanoid');
|
||||
const { nanoid } = require('nanoid');
|
||||
|
||||
async function init() {
|
||||
const filepath = './public/img/sfw/animals/j0iiByCxGfA.jpeg';
|
||||
|
|
Loading…
Reference in New Issue