forked from Yara724/api
fix: make user branch selection and signature completion reliable
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { extname } from "node:path";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { mkdirSync } from "node:fs";
|
||||
import {
|
||||
Body,
|
||||
@@ -392,7 +393,7 @@ export class RequestManagementV2Controller {
|
||||
storage: diskStorage({
|
||||
destination: "./files/signs",
|
||||
filename: (req, file, callback) => {
|
||||
const unique = Date.now();
|
||||
const unique = randomUUID();
|
||||
const ext = extname(file.originalname);
|
||||
const filename = `${file.originalname.split(/[.,\s-]/)[0]}-${unique}${ext}`;
|
||||
callback(null, filename);
|
||||
|
||||
Reference in New Issue
Block a user