[mod_python] Download authorisation

jarrod roberson jarrod.roberson at gmail.com
Wed Jun 22 01:18:53 EDT 2005


On 6/17/05, Wouter van Marle <wouter at squirrel-systems.com> wrote:
> 
> Hi all,
> 
> I've a problem that I'm struggling with: how to allow a certain user a 
> download, so that the user can download it once and only once? The 
> authorisation part I have; what I'm struggling with is how to open the 
> download for that specific file to the user (not too hard), and mainly how 
> to check whether the file has been downloaded completely. Taking into 
> account that a user may only be able to download it partly now, and has to 
> resume later.
> I can't find anything with google... can't think of a specific enough 
> query.
> 
> Wouter. 



you could try just write a cleanup handler that deleted the file when the 
download was completed 200 OK.

If you want to allow ranged gets for partial downloads you will have to 
store what parts the person has downloaded somewhere in a file and update 
that and check for completion in a cleanup handler somewhere.

this is just a data tracking problem, if you have a single server this is 
easy to solve, if you have a cluster of servers it gets more complicated 
very quicklly



-- 
If you don't know what you want, you probably need a nap.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050622/13645a9a/attachment.html


More information about the Mod_python mailing list