0

Is it possible to upload multiple files (images in particular) using CakePHP Uploader and HTML5 multiple attribute? And of course save those images with hasMany relation, eg Project hasMany Image.

EDIT:

I am using CakePHP 2.x, this is the Uploader. I have tried adding multiple attribute to input, but seems that is not working, only saves 1 image. Miles is suggesting multiple inputs, I wanted to use only one input field for this matter. So the question above stands.

2
  • Which "CakePHP Uploader" are you referring to? What version of CakePHP are you using? What have you tried so far? What's your actual question? Commented Sep 11, 2013 at 12:58
  • I've just edited the question. Commented Sep 11, 2013 at 14:32

1 Answer 1

2

The simple answer is: Not out of the box. Multiupload widgets are actually kind of tricky (as you need to change the behavior of the upload panel. My weapon of choice for this is: http://blueimp.github.io/jQuery-File-Upload/

A very simple javascript example is provided here: http://kajda.com/scripts/multiupload/js/multiupload.js

Alternatively, you could have a field that takes multiple drag and drops (using HTML5) instead of the upload panel. Check this one out: http://www.9lessons.info/2012/09/multiple-file-drag-and-drop-upload.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.