campo de carga de múltiples imágenes

Its pretty simple to add form fields for uploading files etc, but I am after one that I can highlight several files and upload them all in one field.

Is there a plugin of some sort that can allow me to do this? I cant find one, also, do v1 plugins work with v2?

I should be able to add the ability to show the files and delete them myself but if this was included it would be very nice.

Gracias.

EDIT: I am using CakePHP!

preguntado el 08 de noviembre de 11 a las 09:11

4 Respuestas

You can do that with normal php code

If you use multiple input fields you can set name="file[]". That will put them in an array when you upload them

($_FILES['file'] = array ({file_array},{file_array]..))

O tratar

Enchufar

Update: For Cakephp

respondido 08 nov., 11:13

Use uplodify it will allow you to upload multiple files

Refiera esto http://www.uploadify.com/demos/

respondido 08 nov., 11:13

in HTML5 you can use like below

<form action='#' method='post' enctype='multipart/form-data'>
  <input name='uploads[]' type=file multiple>
  <input type='submit'>
</form>

html5
using PHP

respondido 08 nov., 11:13

@Jleagle.. i dont have any experice with cake PHP. i just suggest you how to use in HTMl and php - diEcho

Well, you could just try using the attribute multiple="multiple" on your file input, and see how it goes. Most modern browsers support this, and those who don't would limit it to 1 file.

If you name it with brackets PHP will probably make it an array.

<input type="file" multiple="multiple" name="files[]" />

respondido 08 nov., 11:13

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.