I am building a file repository for the press industry. The independent publisher pays for bandwidth used (ie: sum file size uploaded and downloaded). My problem is that if you click to download it logs it as a download, is there a way that one can find out which button was clicked ("save as" or "cancel")

:o I use asp upload and asp vb script.

I bet you don't know how!!! ( :twisted: reverse psychology, worth a try)

Hey Willliam! Welcome to DaniWeb. Unfortunately, I don't think that what you are asking is possible, since once you reach that Save As dialog, all of the work being done is client-side. I'm confused what you're asking for though. If the "cancel" button is hit, no bandwidth is wasted? Are you referring to the Save As / Open dialog box that appers? Either way, the user is capable of downloading and opening the file.

Here's an idea. Instead of linking directly to the file, link to a click tracker file. When visitors click on the click tracker script, it records the time, and their IP address, and then redirects them to the file where the Save dialog is automatically presented. (Are you alredy doing this to log how many downloads?) At the same time, use a server-side script to log server activity. Each time the file to be downloaded is accessed on the server (which means it's been actually downloaded), keep a lot of the time and IP address. You can then match up these two log files to see who just clicked "download" and who clicked "download" and had the file sent to them.

I have got a page that writes the file size to a database (this gets
totald to get bandwidth used, (not very reliable)) and on this same
page it calls up the "save as" box. my problem is that everytime
someone calls up the dialog box it adds it to the DBASE even if they
click cancel. I want it to only write the details if the person clicks
"save as". is this possible and not "cancel"?

This article has been dead for over six months. Start a new discussion instead.