Force Download Feature not working properly with PDF files

Force Download Feature not working properly with PDF files

by Hellmuth Sole -
Number of replies: 1
I'm using moodle 1.9.2 on a shared hosting platform and have quite a bit of resources which are pdf files. I've checked on all of them the "force download" feature, however it doesn't seem to work. I've checked the documentation and it says it only works when the files are within moodle, so I've actually copied most of them (most courses have 4 or 5 pdf files which are the same for all) into each course's folder in the moodledata folder, however it still doesn't work.

The way I linked the files was through FTP (all of the files shown in each course) and then pointed the resource link to the file in the directory. When I copied the files directly into the course in moodledata, I ftp'ed the file there, then used moodle's internal browser to select the file.

I've also tried a hack I read in the forums, which was to change the value in the file.php file to force downloads sitewide, with no result. The odd thing is that all other files do download instead of displaying within the browser.

Any ideas?
Average of ratings: -
In reply to Hellmuth Sole

Re: Force Download Feature not working properly with PDF files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I am not sure about the PDF files not downloading; but am pretty sure that the hack you tried is causing all of your other files to download! I would change the hack back and then you should get normal operation for everything else at least!

The PDF issue may have something to do with the new way in which view.php is handling displaying resources...