Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: upload module

Nevo David86398fc2b30d
diff --git a/libraries/nestjs-libraries/src/upload/upload.module.ts b/libraries/nestjs-libraries/src/upload/upload.module.ts
index 4f8e8cb11..ebe8467e4 100644
--- a/libraries/nestjs-libraries/src/upload/upload.module.ts
+++ b/libraries/nestjs-libraries/src/upload/upload.module.ts
@@ -1,8 +1,8 @@
import { Global, Module } from '@nestjs/common';
-import {MulterModule} from "@nestjs/platform-express";
-import {diskStorage} from "multer";
-import {mkdirSync} from 'fs';
-import {extname} from 'path';
+import { MulterModule } from '@nestjs/platform-express';
+import { diskStorage } from 'multer';
+import { mkdirSync } from 'fs';
+import { extname } from 'path';
const storage = diskStorage({
destination: (req, file, cb) => {
@@ -20,7 +20,10 @@ const storage = diskStorage({
},
filename: (req, file, cb) => {
// Generate a unique filename here if needed
- const randomName = Array(32).fill(null).map(() => (Math.round(Math.random() * 16)).toString(16)).join('');
+ const randomName = Array(32)
+ .fill(null)
+ .map(() => Math.round(Math.random() * 16).toString(16))
+ .join('');
cb(null, `${randomName}${extname(file.originalname)}`);
},
});
@@ -29,7 +32,7 @@ const storage = diskStorage({
@Module({
imports: [
MulterModule.register({
- storage
+ storage,
}),
],
get exports() {