Skip to content

Commit

Permalink
[FIXED] :: uuid not resolve on production (#10)
Browse files Browse the repository at this point in the history
- previously uuid installed as dev deps in package.json
- migrate from uuid to crypto nodejs modules
  • Loading branch information
chanphiromsok authored Sep 3, 2024
1 parent 3bb3c46 commit 05c05f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fastify-file-interceptor/src/multer/utils/random-generator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { v4 as uuid } from "uuid";
const crypto = require("crypto");

export const randomStringGenerator = () => uuid();
export const randomStringGenerator = () => {
return crypto.randomUUID({ disableEntropyCache: true });
};

0 comments on commit 05c05f9

Please sign in to comment.