I uploaded 4GB full DVD files and placed it inside downloadable product --> URL. The problem is Magento automaticlly creats a custom download link. Instead of downloading directly from the server it uses php to handel the download. For that I need a huge memory limit in php.ini (at least 5 GB) I want the user to get the original full URL so I won't have to use space for every download. how can I do that?
Asked
Active
Viewed 1,593 times
1
-
1You realize that your product will then no longer be protected? – Pekka Jul 30 '12 at 11:42
1 Answers
0
You can choose the proper tools for proper tasks. If you wan't to pipe the download directly and verify if the user has rights to download the file use x-sendfile mod for apache (or your web server)
https://tn123.org/mod_xsendfile/
Using X-Sendfile with Apache/PHP
http://codeutopia.net/blog/2009/03/06/sending-files-better-apache-mod_xsendfile-and-php/
you will need to override the downloadable class that sets the headers for download to use proper headers and paths then it will work without consuming huge amounts of memory.
-
I don't need that, i don't care about the files because most of my customers won't steal from me. I want Magento to use the URL and not the custom URL can I do that? – user1562726 Jul 30 '12 at 12:19
-
yes you can approach is the same, overwrite the block that gives you the link – Anton S Jul 31 '12 at 08:08
-
Hi Anton and thank you again. Can you please tell me how to overwrite the block? – user1562726 Aug 05 '12 at 07:01