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

增加getFileNameFromDisposition无参函数,从Content-Disposition头中获取文件名 #3590

Closed
wants to merge 1 commit into from

Conversation

hailindai
Copy link

@hailindai hailindai commented May 19, 2024

修改描述

  1. [新特性] 增加getFileNameFromDisposition无参函数,从Content-Disposition头中获取文件名。
    参考如下网址中http协议中Content-Disposition部分描述:
    https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Content-Disposition#%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E6%80%A7

@looly
Copy link
Member

looly commented May 20, 2024

此方法已有:

image

@looly looly closed this May 20, 2024
@hailindai
Copy link
Author

此方法已有:

image

已有带参数方法,存在缺陷。

  1. 获取文件名时,并不知道该传什么参数合适。
  2. 已有带参数方法,兼容性不佳,不支持filename* 参数的文件名。
    image

@looly
Copy link
Member

looly commented May 20, 2024

@hailindai 确实,这块做了手动修改,见:

228785b

你PR的逻辑也存在一些问题,比如多个header没有遍历解决,我手动修改解决了这些问题。

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

Successfully merging this pull request may close these issues.

None yet

2 participants