Wouter van Marle
wouter at squirrel-systems.com
Wed Jun 22 03:51:09 EDT 2005
On Wed, 2005-06-22 at 01:18 -0400, jarrod roberson wrote: > > > 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. The clean-up handler is the easy part :) How to capture such a 200 OK message? > 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. No partial downloads other than later resumes - and as I understand from Jim Gallacher the client should request this, so no need to store progress info on my side. Wouter. > > 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.
|