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

针对网页上不正确图片URL的判断与解析 #17

Open
huiyadanli opened this issue Oct 21, 2018 · 0 comments
Open

针对网页上不正确图片URL的判断与解析 #17

huiyadanli opened this issue Oct 21, 2018 · 0 comments

Comments

@huiyadanli
Copy link
Owner

PasteEx 对网页上的 GIF 图的粘贴为文件,实际是直接根据剪切板中的 HTML Format 内容直接下载图片,剪切板本身是不会储存完整 GIF 的。详见 #5

但是实际上有些网页中的图片 url 的扩展名是错误的,比如 gif 图用的 jpg 的扩展名,导致 PasteEx 无法对图片进行正确的判断。

现在有两种解决方案:

  1. 凡是能在剪切板中能够获得 HTML Format 内容的图片,一律使用下载的方式进行获取。(效率,和用户体验上会差一点)
  2. 对 HTML Format 中的图片 url 进行预下载,通过文件头判断出正确的扩展名。

暂定方案2,可能会在预览、插件功能发布的时候顺便解决掉这个问题。

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

No branches or pull requests

1 participant