Hi FroggEye,
This is a complicated custom biz form that does already set this cookie that I was talking about. I just need to know how I can check the cookie on the user clicking a link to a document. When you said this:
You could then check if the name, IP and email combination are the same when they come back to download it.
How would you go about checking this? I can just swap that out for checking the cookie but when it is a pdf or image uploaded as a document in the tree, where would I put the code to check the cookie? I can't find a way to put a macro or something on this type of document. Are you saying to create separate page that does this checking and then redirects them to the file? if so, it is the same problem where someone can send the final link they land on to someone and then they can download the file.
If this was not a kentico project I could do this easily and have done so on many projects. I would put the files in a non web accessible folder and serve the binary content directly to the user (as a download) from a page that checked their credentials (the cookie in this case). Is there a way to output the file somehow directly to the browser from this intermediate page and make the file itself protected with permissions so it could not be accessed directly?
Or maybe impersonate a generic user that has permissions to the file somehow once they submit the form? But I don't want them logged in as a user really. I feel like I am over complicating this and that there must be some built in kentico function for this that I am just missing.
Thanks,
Matt