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.
2
Answers
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:
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
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
For downloading in curl try using below :
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