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

使用文件上传组件上传的pdf文件,无法实现a href让其可以在线预览,总是跳转到下载该文件 #692

Open
manli-tonghua opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@manli-tonghua
Copy link

使用文件上传组件上传的pdf文件,相同a href让其可以在线预览,却总是下载该文件,请问如何解决

@edwardshen3033
Copy link

我是把后端代码里的FileTypeUtils类里writeAttachment方法的header里的Content-Disposition改成inline

@YunaiV
Copy link
Owner

YunaiV commented Nov 9, 2024

我是把后端代码里的FileTypeUtils类里writeAttachment方法的header里的Content-Disposition改成inline

是个思路哈。

@YunaiV
Copy link
Owner

YunaiV commented Nov 9, 2024

inline

改成 inline 有没带来其他问题哈?

类似需要下载的场景,jpg 或者 png,变成了预览。

@YunaiV YunaiV self-assigned this Nov 9, 2024
@YunaiV YunaiV added the question Further information is requested label Nov 9, 2024
@xyj040303
Copy link

在请求地址里添加参数控制Content-Disposition,按业务实际需求来确定具体值

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

No branches or pull requests

4 participants