mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
import fs dep at file level
This commit is contained in:
parent
7ce8d0de44
commit
8948369a1b
1 changed files with 1 additions and 1 deletions
|
@ -23,6 +23,7 @@ const supportedMimeTypes = new Map([
|
||||||
['video/m4v', 'mp4'],
|
['video/m4v', 'mp4'],
|
||||||
['video/quicktime', 'mov'],
|
['video/quicktime', 'mov'],
|
||||||
]);
|
]);
|
||||||
|
const fs = await import('node:fs/promises');
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoProcessingService {
|
export class VideoProcessingService {
|
||||||
|
@ -105,7 +106,6 @@ export class VideoProcessingService {
|
||||||
.on('end', async () => {
|
.on('end', async () => {
|
||||||
try {
|
try {
|
||||||
// Replace original file with optimized version
|
// Replace original file with optimized version
|
||||||
const fs = await import('node:fs/promises');
|
|
||||||
await fs.copyFile(tempPath, source);
|
await fs.copyFile(tempPath, source);
|
||||||
this.logger.info(`Web-optimized video: ${source}`);
|
this.logger.info(`Web-optimized video: ${source}`);
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Add table
Reference in a new issue