Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Failure when uploading clipboard images with PicGo (#3360) #3366

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Jakentop
Copy link

Q A
Bug fix? yes
New feature? no
Breaking changes? no
Deprecations? no
New tests added? not needed
Fixed tickets Fixes #3360
License MIT

Description

Fix the situation that picgo uploading pictures from clipboard will keep spinning around and cannot upload successfully.
The reason for the error is that the clipboard image needs to be saved in a temporary file when uploading, but when calling string splicing, it tries to splice a number type into a string resulting in an error.
Even if the number is converted to a string type, when picgo uploads it does not recognize the MIME-Type due to the lack of a suffix, so picgo throws an exception.
A more complete solution is to get the MIME-TYPE of the image and convert it to the corresponding suffix. But here the fix directly adds a default suffix .png to the image, and after testing I found this to be the easiest and working solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure when uploading clipboard images with PicGo
1 participant