[Seaside] Multiple versions of a image file
renggli at gmail.com
Sat Feb 16 18:01:12 UTC 2008
> Anyway, I'm using Magritte to implement an application and I'd like to
> automatically generate version of an image file as soon as its upload.
> My first thought has been to change MAFileModel to support that and
> propagate the support to its subclasses, and change MAFileDescription
> to support a new attribute called versions or something like that. Is
> that a good path, or is there is something already that I should use?
It depends if you want to version files also in other situations. If
this is the only case then it is certainly simpler just to have
specific accessors in your model:
imageFileVersions add: aFileModel
^ imageFileVersions isEmpty ifFalse: [ imageFileVersions last ]
More information about the seaside