.
This commit is contained in:
parent
8c1ce3de4c
commit
099195c37b
@ -72,6 +72,6 @@ RUN yarn install --production
|
|||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
# Comando para correr la aplicación
|
# Comando para correr la aplicación
|
||||||
#CMD ls -la /api/uploads
|
CMD ls -la /api/uploads
|
||||||
CMD node -r ts-node/register/transpile-only -r tsconfig-paths/register ./server/src/index.js
|
#CMD node -r ts-node/register/transpile-only -r tsconfig-paths/register ./server/src/index.js
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,9 @@ export function createMulterMiddleware(options: CreateUploadMiddlewareOptions) {
|
|||||||
},
|
},
|
||||||
filename: (req, file, cb) => {
|
filename: (req, file, cb) => {
|
||||||
const ext = path.extname(file.originalname);
|
const ext = path.extname(file.originalname);
|
||||||
cb(null, `${file.originalname}-${Date.now()}.${ext}`);
|
const name = path.basename(file.originalname, ext);
|
||||||
|
const timestamp = Date.now();
|
||||||
|
cb(null, `${name}-${timestamp}${ext}`);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user