I actually attempted adding another form class called FileInput but
was
having issues figuring out everywhere it should be referenced, looks
like
you are declaring them statically. I tried adding it on so that it
was
available to me as Recess Type when creating a new app form tools,
but it
totally fouled up. I also added another function to the form class
under
begin for enctype of multipart for files, or would it be best to add
it to
the original function with a variable? If you could help me out with
how to
go about adding another form type of File I think I could figure the
rest
out. I actually had it working by hijacking the $_FILES global before
saving
the model data back to the database, performing my upload there, and
then
passing the new filename back before save. But I realise this needs
to be
included in the core. If you want I can send you what I did, or I may
mess
with gitHub tonight.
On Apr 7, 9:59 am, Kris Jordan <
krisjor...@gmail.com> wrote:
> Mike-
> There is not yet an officially recommended way of handling file uploads
> beyond PHP's built-in constructs. Would love for you to fork the source and
> take a stab at framework-level integration if you've got some ideas.
>
> As for the problem during deletion, it looks like a problem of a class not
> having been 'imported' or autoloaded. In models that have relationships
> you'll want to import the related classes at the top of your file like so:
>
> <?php
> Library::import('myAppsDirName.models.Comment');
>
> /** !HasMany comments */
> class Post { }
> ?>
>
> Similarly:
> <?php
> Library::import('
myAppsDirName.models.Post');
>
> /** !BelongsTo post */
> class Comment {}
> ?>
>
> Hope this helps - ping again if you're still running into issues!
>
> Kris
>