文件下载在Azure App服务中的Firefox中失败,并使用安装的文件存储

发布于 2025-02-11 00:49:54 字数 1207 浏览 2 评论 0 原文

这是我的堆栈:

  • Azure App Service(P1V2计划)
  • Docker容器
  • PHP:7.4-Apache Base Image
    Apache2配置未更改
    PHP配置未更改
  • Azure存储帐户“标准”,也尝试了“ Premium”
    AzureFile映射到文档根部的子d。

我尝试直接使用Apache2下载75 MB文件。

它可以与Chrome浏览器一起使用,但在Firefox和Curl中不起作用。

为了进行测试,我创建了两个不同的文件:

一个2 MB文件可在Firefox中下载。 3 MB文件在Firefox中不起作用。

如果我不将其放入AzureFile目录,而是直接在容器中的另一个目录中,则75 MB文件的下载有效。

似乎Azure存储是负责该文件无法以Firefox和Curl下载的原因。但是在Chrome中,它出于某种原因有效。

我是否缺少任何配置,还是不支持此用户酶? 我该如何修复下载,以便在所有图案上工作?

编辑:

卷曲输出:

curl http://example.com/install/TheSetup.exe --output TheSetup.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     
Time  Current
                                 Dload  Upload   Total   Spent  Left  Speed
  1 75.6M    1  988k    0     0  1937k      0  0:00:39 --:--:--  0:00:39 1937k
curl: (18) transfer closed with 78332760 bytes remaining to read

Firefox错误:

Firefox正在下载文件的一部分,但很快就会出现“ Fehlgeschlagen”。

This is my stack:

  • Azure App Service (P1V2 Plan)
  • Docker Container
  • php:7.4-apache base image
    apache2 config not changed
    php config not changed
  • Azure Storage Account "Standard", also tried "Premium"
    AzureFile mapped into subdir of document root.

I try to download a 75 MB file directly with apache2.

It works with Chrome Browser, but doesn't work in Firefox and curl.

For testing I created two different files:

a 2 MB File works to download in Firefox. A 3 MB File doesn't work in Firefox.

The download of the 75 MB file works if I don't put it in the AzureFile directory but in another directory directly in the container.

It seems that the Azure Storage is responsible that the file can not be downloaded in Firefox and curl. But in Chrome it works for some reason.

Am I missing any configuration or is this usecase not supported?
How can I fix the download, that it works on all plattforms?

Edit:

curl output:

curl http://example.com/install/TheSetup.exe --output TheSetup.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     
Time  Current
                                 Dload  Upload   Total   Spent  Left  Speed
  1 75.6M    1  988k    0     0  1937k      0  0:00:39 --:--:--  0:00:39 1937k
curl: (18) transfer closed with 78332760 bytes remaining to read

Firefox error:

Firefox is downloading a portion of the file but very soon the "Fehlgeschlagen" is appearing.

Firefox screenshot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沉溺在你眼里的海 2025-02-18 00:49:54

此问题可能会根据您的Windows版本安全软件停止下载而发生,而Firefox始终使用temp文件夹在后台启动下载,因此,如果您使用扩展名,则大型文件无法下载

  • ,请尝试禁用或通过 - >附加组件 - >扩展
  • 尝试将其关闭至完全关闭Firefox完全并从
  • 否则,在新的选项卡类型中涉及:config->接受继续,在该搜索框类型浏览器中。下载在其中您可以看到 browser.download.manager.resumeonwakedelay 将其更改为十万和 browser.downloads.savelinkasfilenametimeout 将其更改为40000,并输入5月有可能

curl --location --request GET 'https://go.microsoft.com/fwlink/?linkid=2108834&Channel=Stable&language=en' --output foo.exe

的 可能性:

http://kb.mozillazine.org/unable_org/unable_save_save_save_save_save_save_save_save_save_save_downloadload_downoadloadload_files </

a htpps

This issue may happen depending on your Windows version security software stops the downloads and Firefox always uses the temp folder to start the download in the background so large files can't be able to download

  • If you are using extension, try to Disable or remove extensions via Tools -> Add-ons -> Extensions
  • Try to close the to close Firefox completely and delete the "compreg.dat" file from the Firefox profile folder
  • Otherwise, In new tab type about:config -> accept & continue and in that search box type browser. download in that you can see browser.Download.manager.ResumeOnWakeDelay change it as hundred thousand and browser.downloads.SaveLinkAsFilenameTimeout change it as 40 thousand and Enter may have possibilities to work

For downloading in curl try using below :

curl --location --request GET 'https://go.microsoft.com/fwlink/?linkid=2108834&Channel=Stable&language=en' --output foo.exe

For your Reference :

http://kb.mozillazine.org/Unable_to_save_or_download_files

https://support.mozilla.org/en-US/kb/where-find-and-manage-downloaded-files-firefox

懵少女 2025-02-18 00:49:54

网络存储安装的目录(例如NFS或SMB)也有两个配置设置,这些配置也适用于Azure App Service Docker容器中安装的Azure存储的用户:

EnableSendfile Off
EnableMMAP Off

可以为虚拟主机或每个目录设置此设置。

请参阅:

httpps:///httpd.apache.org/docs.org/docs/2.4/ mod/core.html#enableMmap
https:///htttpd.apache.opache.org/docs/ddocs/2.4/mmod/ core.html#enablesEndFile

There are two configuration settings for network storage mounted directories like NFS or SMB that also apply for this usecase of azure storage mounted in azure app service docker container:

EnableSendfile Off
EnableMMAP Off

This can be set for the virtual host or per directory.

See:

https://httpd.apache.org/docs/2.4/mod/core.html#enablemmap
https://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文