I have a web application in which I have attached multi-media files to the document in a Rich Text Field, and I use an XML document which is also an attachment to open those media files via a flash player, embeded on the document.
Is there a way to protect my application so that domino can access these attachment in the course of generating web pages, but prevent them from being directly opened by someone’s browser via the $File URL linking I mentioned above? I need to allow anonymous access to the web site.
Not sure why you would want to do this. If the user has access to the content, why does it matter if they can access it directly?
I’m thinking maybe what you really want is not to protect the attachment but to protect the document so the user can’t see anything if they go straight to the document (http://server.com/database.nsf/Docid). If that’s what you really want to do, just add a hide-when to the form that hides everything from Anonymous users. To “hide” the attachments if the user tries to access the document directly, you will need to add a “$V2AttachmentOptions” computed-for-display field that computes to “0”. However this will not prevent them from accessing the attachment directly (http://server.com/database.nsf/Docid/$File/…)