Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PDFs and other media documents using the "Download Link" display hesitate for anonymous users. I've confirmed that all the Download permissions are set correctly for anonymous users.
Comment | File | Size | Author |
---|---|---|---|
#7 | file_entity_media_dev_distro_download_link.jpg | 97.23 KB | joseph.olstad |
#7 | php.ini_.txt | 69.66 KB | joseph.olstad |
Comments
Comment #2
museumboy CreditAttribution: museumboy commentedComment #3
joseph.olstadThis is a Duplicate issue, there is a workaround, search for open and closed media and or file_entity issues.
Please link the issue to this one when you find it.
Comment #4
museumboy CreditAttribution: museumboy commentedI see several issues where people are getting denied access to files but that is not my problem.
The file downloads quickly but stops at the last few kilobytes and won't always complete. This is the case even if the file is extremely small. It only happens using the Download Link option.
Comment #5
joseph.olstadsounds like a web server or php setting issue.
what is your web server version and type?
apache , nginx, iis , xyz?
php version?
review your php.ini settings for the server
review your network configuration and hardware.
Comment #6
museumboy CreditAttribution: museumboy commentednginx, varnish. PHP 5.5.14.
The admins say they haven't done any updates.
Comment #7
joseph.olstadI downloaded and installed todays release of the media_dev distribution that has the latest media 7.x-2.13 release baked in , everything works.
sounds like a network issue or a server configuration issue on your side.
double check your php.ini settings for transfer timeout and max packet limits and upload limits and whatever timeout limits you can see.
Here's my php.ini (link , I renamed it to php.ini.txt from php.ini to bypass the upload filter on d.o)
(it works)
I tested on php 5.6.30-0+deb8u1
See screenshot, I downloaded a 6MB file , no problem.
can you try this using a web browser sitting on a computer inside your firewall , the closest possible to the server host network/subnet the better. if it works there, it's some firewall filtering thing.
What you should do is implement https , this will bypass packet sniffers that your network people have enabled (avoid false positives and lost packets by using https because the packet sniffers cannot decrypt the packets and thus cannot filter them) packet sniffing tools that network security people use far too often will mangle packets or drop them completely or break transmissions.
implement https and you'll most likely bypass most of your proxy / packet sniffing /network issues.
otherwise check your server settings,php settings (php.ini for nginx), web server settings (nginx) and/or varnish.
see screenshot
Comment #8
joseph.olstadalso might be related to varnish
you might want to adjust your varnish settings , could be that the maximum varnish cache size exceeds the filesize. varnish might be trying to cache the request even though it might not be a good idea for it to cache downloads.
You could increase your varnish cache limits so that it can cache huge files.
this might also explain why this only affects anonymous users.
You could also implement some varnish rules to ignore the url pattern that corresponds to the download link.
Comment #9
joseph.olstadComment #10
joseph.olstadSuspect most likely conflicting varnish configuration in this case. Not a file_entity problem.
Comment #11
joseph.olstadany luck with your varnish settings?