Anonymous file download

Events happening in the community are now at Drupal community events on www.drupal.org.
erosenfield's picture

With the current, stable ecommerce version, I'm putting together a site where free (price $0) file products can be downloaded without purchase. I've made it so that free file products are uploaded into an unprotected directory, and I've modified ec_file_may_download in file.module to allow these files to be downloaded with whatever permissions. This works perfectly for authenticated users, they can download these files easily, however anonymous users get redirected to a 404. I've tried stepping through the code and I can't figure out why this is happening; ec_file_may_download doesn't even get called when anonymous users click the link (that is, "
"/store/myfiles/0/download?file=files/file.txt"). I could always simply change the link to a direct link to the file ("/files/file.txt"), but then files will open in the browser and that's not the desired behavior. Anyone know what I'm doing wrong?

Thanks in advance,
Eric Rosenfield

Comments

tunde1938's picture

I have searched the drupal admin and settings etc it seems i do not have permisions to download files anonymously. Am I doing soomething wrong . I have documents on my site I am trying to make aailable to users and it is not successful

e-Commerce Module

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: