mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #11160 from overleaf/msm-replace-uuid-crypto
Replace `uuid`/`node-uuid` with `node:crypto` GitOrigin-RevId: 1be4f09c4681edac7e8bc58af3b5726d0d5ee322
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs')
|
||||
const uuid = require('node-uuid')
|
||||
const crypto = require('crypto')
|
||||
const path = require('path')
|
||||
const Stream = require('stream')
|
||||
const { callbackify, promisify } = require('util')
|
||||
@@ -49,7 +49,7 @@ async function deleteFile(fsPath) {
|
||||
|
||||
function _getPath(key) {
|
||||
if (key == null) {
|
||||
key = uuid.v1()
|
||||
key = crypto.randomUUID()
|
||||
}
|
||||
key = key.replace(/\//g, '-')
|
||||
return path.join(Settings.path.uploadFolder, key)
|
||||
|
||||
Reference in New Issue
Block a user