I'm trying to put together a multi-file upload thing and I'm wondering
how the element names should be set up and how I should expect the
array keys to come in. I plan to use the jquery-multifile-plugin [1]
and it appears that I'll need to adjust it slightly to deal with
Cake's input naming convention (ie. deal with the brackets). Before I
do that, though, I'd like to be clear on how the $data array should
look.

The model in question is ItemFile (belongsTo Item). The view code is:

$form->file('ItemFile.upload', array('class' => 'multi'))

The resulting element name in the source looks like:

name="data[ItemFile][upload]"

So, first off, how do I get the extra empty braces "[]" that I need at
the end of the name? I tried $form->file('ItemFile.upload[]'... but
that gave me:

name="data[ItemFile][upload[]]"

I don't mind doing without FormHelper for this but, if there's a way
to do this, I'd like to know.

Anyway, once I do have the input names correct, how should I expect
the data array to look? I'vefound a couple of Cake multi-upload
examples online but none of them can be used for my app and, in any
case, not one of them explains the data array. Anyone done this?

[1] http://code.google.com/p/jquery-multifile-plugin/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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