fix issue 3268

This commit is contained in:
hahaha28 2022-05-22 13:44:37 +08:00
parent 2bb405a03e
commit d2eedef611

View File

@ -154,7 +154,7 @@ export const uploadImage = async (pathname, image, preferences) => {
if (typeof filepath !== 'string') { if (typeof filepath !== 'string') {
isPath = false isPath = false
const data = new Uint8Array(filepath) const data = new Uint8Array(filepath)
filepath = path.join(tmpdir(), +new Date()) filepath = path.join(tmpdir(), String(new Date().getTime()))
await fs.writeFile(filepath, data) await fs.writeFile(filepath, data)
} }
if (uploader === 'picgo') { if (uploader === 'picgo') {