Skip to main content
August 12, 2008
Question

Confirm File was accessed and by what IP?

  • August 12, 2008
  • 1 reply
  • 284 views
Greetings

I use cffile for an administrator to upload documents (PDF) to a repository directory. The name of the file is captured to the DB when uploaded.

I need to confirm if/when an end user has accessed the document, and any other information I can capture (IP address, etc.?) using a yes/no flag field and a field to store IP address? The user's info is already a record in the DB, and their session variable is available at log-in.

Thanks in advance

newportri
This topic has been closed for replies.

1 reply

Inspiring
August 13, 2008
instead of linking directly to the file in your pages, create an
intermediary page that will capture the user data you want, insert a
record into the db and then either serves up the file using
cfheader/cfcontent tags or cflocate to the actual file. you will need to
pass the filename requested by user to this intermediary page (i.e. in a
url var).

eg:
instead of links like <a href="somepdf.pdf"> you will have links like <a
href="viewfile.cfm?file=somepdf.pdf">

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/