[Zope] Set expire date for file

Sven Syld Sven.Syld@stat.ee
Wed, 02 May 2001 17:02:05 +0300


> the constructor of images and files looks like this:
> def __init__(self, id, title, file, content_type=3D'', precondition=3D'')=


> the optional precondition can take the id of a method which is called
> when the image/file is published, e.g. its index_html methods gets
> called.
> You only have to make a method in the acquisition path wich reads this
> (in dtml)
> <dtml-call "RESPONSE.setHeader('expires',_.DateTime()-1.0)">
> <dtml-return "''">

Value of the expiring date needs to be according to RFC1322 standard, but =
rfc822() attribute of DateTime will do just fine. And time must be =
converted to GMT+0.

Thanks,

Sven