Hi Roberto,

One solution is to provide a temporary identifyer via cookie, which gets
set if the user sees your page but is not set if she wants to
download it directly. A simple non guessable scrable mechanism
using your page url, file url and probably ip of the downloader
should do for the cookie value.

File objects can have a "precondition" which refers to a method
where you can evaluate the cookie and serve the file or refuse
access (via raise "Redirect",url)

I would not recommend to use HTTP_REFERRER for this, because this
is by no way relieable.


--On Dienstag, 12. November 2002 16:11 -0800 General Info <[EMAIL PROTECTED]> wrote:

i have the following situation.
i want the users to be able to download non html documents if that
document is refered to from an html document. however, i dont want the
users to be able to type the url and document name on the url box of
their browers and be able to download it.  for example:
the documents exist in http://www.wwwdotcom.com/nonhtmldocs/doc1.pdf
however, i dont want the users to type that url on their browser and
access doc1.pdf  i only want them to access it if that particular
document is linked from an html document.  i have seen some websites that
do that w/ images. how can i do that on zope? is it possible?
i would appreciate any comments/suggesstions.


Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )

Reply via email to