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

put_file,下载链接最前面是blob:,导致在"手机"上的浏览器不能下载或者下载下来文件名改变(电脑端正常) #542

Closed
freemedom opened this issue Feb 10, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@freemedom
Copy link

注: 对于PyWebIO使用咨询或对于其他人也可能有帮助的问题,请考虑移至 Discussions 进行发帖。

BUG描述
描述BUG表现以及复现方式。
如果浏览器控制台有报错以及脚本抛出异常也请将报错信息附上

环境信息

  • 操作系统及版本: Android10
  • 浏览器及版本:
  • Python版本: 3.9
  • PyWebIO版本: 1.7.1
@freemedom freemedom added the bug Something isn't working label Feb 10, 2023
@freemedom
Copy link
Author

#406 (comment)

@freemedom
Copy link
Author

@freemedom
Copy link
Author

但是我还不太理解如何修改

@freemedom
Copy link
Author

@freemedom
Copy link
Author

试了下pywebio.session.download也是出现这个问题

@wang0618
Copy link
Member

可以通过另一种兼容性更好的方式下载文件:

  1. start_server() 中通过 static_dir 指定一个本地目录来存放静态文件
  2. 把要下载的文件保存到此目录中
  3. 通过 put_link(name, '/path/to/file') 来显示下载链接

@freemedom
Copy link
Author

可以通过另一种兼容性更好的方式下载文件:

  1. start_server() 中通过 static_dir 指定一个本地目录来存放静态文件
  2. 把要下载的文件保存到此目录中
  3. 通过 put_link(name, '/path/to/file') 来显示下载链接

感谢,我试一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants