Web - How to stop duplicate downloads?

Hi,

I’ve inherited a Notes DB with web access and I’m having trouble fixing an issue.

It basically has some users uploading files, and other users downloading those files for alteration.

The problem is that 2 users can download the same file, duplicating work.

There are several views which contain links to the documents with an ‘Outstanding’ status. The View ‘Form Formula’ has the name of the ‘Download’ form in it. The form seems to open with an ?OpenDocument url.

The Form contains a ‘Download’ button which sets the status to ‘In Progress’ and provides a link to the attached file. It also seems to reload the form with an ?EditDocument url.

How can I stop 2 people downloading the same file? Ideally, I’d like the Status to be changed when the document link is clicked on in the view, and force the view to refresh in everybodies browser. I’m not sure that’s possible, though.

I guess a last minute check on the status before the file is actually downloaded would do the trick, but if 2 people click on the same link, are they actually opening the same document, or copies of it? Does changing the status in one affect the other?

The code in the ‘Download’ button is:

FIELD DownloadBy:=@Name([CN];@UserName);

FIELD Status:=“In Progress”;

FIELD Check:=“1”;

FIELD DownloadWhen:=@Now;

@Command([FileSave])

The code in the attachment link is:

DatabasePath:=“http://” + @GetHTTPHeader(“Host”) + “/” + @Subset(@DbName;1) + “/”+ @WebDbName;

temp:=@AttachmentNames;

ahref:=“”;

@If(check=“”;“”;@If(temp=“”; “”; “[”+ahref+temp+“”+“]”))

If somebody could help me out, I’d appreciate it.

Many Thanks,

Janine

Subject: Web - How to stop duplicate downloads?

I had a somewhat similar problem that I solved by moving the file off the document and making an agent that retrieves the file. This allows easy tracking of who retrieved the file when, and a way to mark the document from which the file when it was retrieved so that it cannot be retrieved again until after it has been saved back. It basically acts more like a check-in/check-out system than like document locking, as that is what I needed.

Subject: RE: Web - How to stop duplicate downloads?

Thanks for the reply, that sounds like a good solution.

Problem is that I’m not very good with Notes and I don’t want to change the existing system too much in case I muck it up!

I don’t know where the files would be saved if not as attachments to the documents.

Is there a solution that doesn’t involve as much structural change?