milesj/cake-uploader — Issue #44: Problem with HasMany / SaveAll 
Author: Nitrev
Created: 2012-03-06 10:54:54+00:00
State: open

I'm having a problem when performing a SaveAll on a model, which has a HasMany relationship with a model with the Upload behavior .

As follows: Projects HasMany Images, with Images having the 'Uploader.Attachment' behaviour.

According to Cake's documentation, when doing a SaveAll, the form setup should be

text input: Project.title
file input: Image.0.fileName
file input: Image.1.fileName

However, due to the numerical index which gets added in this setup, _parseData (in Uploader.php) doesn't seem to parse the $_FILES to correctly, putting a faulty array in _data, which causes upload() to return false.

Any chance you could debug/fix this and make the behavior work with saveAll()?