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

文件名含有对空格编码的%20导致所有图片全部404,无法访问 #129

Open
Seameee opened this issue Dec 22, 2024 · 2 comments

Comments

@Seameee
Copy link

Seameee commented Dec 22, 2024

bug描述

由于上传图片的文件名含有对空格编码的%20导致所有图片全部404,无法访问

期望行为

可以正常处理文件名含有%20或其他编码的情况

实际行为

image

复现步骤

上传图片文件名含有%20

辅助材料

telegram频道对应图片的消息json:
message.json

图床显示文件名:yande.re%201188448%20bikini%20karutamo%20kurihara_azuki%20swimsuits.png

图床图片链接:https://img.seaya.link/file/1734829046329_yande.re%201188448%20bikini%20karutamo%20kurihara_azuki%20swimsuits.png

补充说明

@MarSeventh
Copy link
Owner

URL中含有保留字符的情况不好处理,因为后端没法知道你这个%20是真的,还是对空格的编码。这似乎是把文件原名作为链接格式所不可避免的,你可以先使用仅前缀命名方式来解决这一问题。

@Seameee
Copy link
Author

Seameee commented Dec 22, 2024

URL中含有保留字符的情况不好处理,因为后端没法知道你这个%20是真的,还是对空格的编码。这似乎是把文件原名作为链接格式所不可避免的,你可以先使用仅前缀命名方式来解决这一问题。

暂时还是需要这些文件名来过滤链接的,我先把这些有问题的过滤掉,等以后修复了再处理好了

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

No branches or pull requests

2 participants