fix Failure when uploading clipboard images with PicGo #3360

This commit is contained in:
Jaken 2022-07-27 10:53:43 +08:00
parent aed36dbf32
commit 9909d3b506

View File

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