🐛 Fix(custom): fix auto name bug

This commit is contained in:
Kuingsmile 2024-11-25 17:30:01 +08:00
parent 7c3508f055
commit 84be430b70
3 changed files with 7 additions and 7 deletions

View File

@ -67,7 +67,7 @@
"multer": "^1.4.5-lts.1",
"node-ssh-no-cpu-features": "^2.0.0",
"nodejs-file-downloader": "^4.12.1",
"piclist": "^1.9.7",
"piclist": "^1.9.8",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"proxy-agent": "^5.0.0",

View File

@ -84,7 +84,7 @@ class Uploader {
ctx.output.map(async (item, index) => {
let name: undefined | string | null
const fileName = autoRename
? `${dayjs().add(index, 'ms').format('YYYYMMDDHHmmSSS')}${item.extname}`
? `${dayjs().add(index, 'ms').format('YYYYMMDDHHmmssSSS')}${item.extname}`
: item.fileName
if (rename) {
const window = windowManager.create(IWindowList.RENAME_WINDOW)!
@ -122,7 +122,7 @@ class Uploader {
const buffer = nativeImage.toPNG()
const baseDir = picgo.baseDir
const fileName = `${dayjs().format('YYYYMMDDHHmmSSS')}.png`
const fileName = `${dayjs().format('YYYYMMDDHHmmssSSS')}.png`
const filePath = path.join(baseDir, CLIPBOARD_IMAGE_FOLDER, fileName)
await writeFile(filePath, buffer)
return filePath

View File

@ -11956,10 +11956,10 @@ performance-now@^2.1.0:
resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==
piclist@^1.9.7:
version "1.9.7"
resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.7.tgz#f34714248c8b72b009626fd7feaa25ac663a0bb4"
integrity sha512-52cRCmGZx3jK9unzK4CAmgzIhOOYrfI71wvdigXjNnWGwfVjhxgWj8UkTLSZ9zPRJXzrOLmJvck30UhWUElBsg==
piclist@^1.9.8:
version "1.9.8"
resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.8.tgz#09eaa51a2c71a0a1db0b2d48feed6c99caf796e2"
integrity sha512-tti3aMsv0/x/UjVCAwvJ+IAPwjH205qUmu4gK/IoSHHR7rV+CVn4dFFcGLSiBasyv0UYm2SlTTRgG4q9Ri2V2w==
dependencies:
"@aws-sdk/client-s3" "3.421.0"
"@aws-sdk/lib-storage" "3.421.0"