> Or maybe even 'MiUploadBehavior extends UploadBehavior', and a call to
> beforeSave{mime}{Type} is made if the method exists etc..

Though this might enforce convention over configuration approach, I
see two possible issues with it. First, some file types have several
mime types -or better, mime names- they can fit ('image/jpg', 'image/
jpeg' for example). On the other hand, you might want different
treatments applied for files of the same type, say extract and record
on DB the text from this PDF, but just zip and store the other one.

When defining validation rules, we can define custom functions or use
the ones implemented in Cake by setting the validation config array.
Maybe we could use something similar to that?

On 13 jul, 12:37, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 13, 11:23 am, Gorka <[EMAIL PROTECTED]> wrote:
>
> > I agree that file uploading should be made as generic as possible, and
> > enabling some callbacks for file processing should be a great bonus.
>
> Hmm,
>
> I'm currently pondering "ImageUploadBehavior extends UploadBehavior"
>
> where upload behavior has empty _postSave __postDelete (referring to
> after saving the original file to the disk, and after deleting the
> original file from the disk) methods and the image version has
> functionality to create/delete thumbs, and DocUploadBehavior has
> whatever else you might want to use etc.
>
> At least then the 'essential' functionality can be separated from
> image (or whatever) specific calls/functionality.
>
> Or maybe even 'MiUploadBehavior extends UploadBehavior', and a call to
> beforeSave{mime}{Type} is made if the method exists etc..
>
> More pondering required.
>
> AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to