[support] Drupal 7 Control file download

Austin Einter austin.einter at gmail.com
Wed Nov 28 05:33:49 UTC 2012


These are private file.

Kamal
Your solution worked.

Thanks.
Austin


On Wed, Nov 28, 2012 at 9:34 AM, Gordon Heydon <gordon at heydon.com.au> wrote:

> Hi,
>
> Are the files that are being downloaded private or public. If they are
> public Drupal is being kept out of the loop, and apache/nginx is handling
> the request, and not Drupal.
>
> Gordon.
>
> On 28/11/2012, at 2:49 PM, Austin Einter <austin.einter at gmail.com> wrote:
>
> > Hi All
> > This is a simple problem, please let me know how to go about it.
> >
> > In a custom module, depending on search keywords, I show number of
> documents in a table to users. When users click on document link, the
> document gets downloaded.
> >
> > For me, I have set  a download limit for each user as 10. So one user
> can download maximum of 10 documents per day.
> >
> > When user clicks on document link, file is getting downloaded. But
> during that time none of my custom module's function is getting executed so
> I am not able to keep track of which user has downloaded how many
> documents, so I am not able to limit the downloads.
> >
> > Can somebody help me , when the user clicks on a document link, how can
> I force at least one function in my custom module should be invoked.
> >
> > Or if there is some other alternative to keep track of documents
> downloaded per user, please let me know.
> >
> > Thanks
> > Austin
> >
> >
> >
> > --
> > [ Drupal support list | http://lists.drupal.org/ ]
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20121128/1b5c971c/attachment.html 


More information about the support mailing list