TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Upload multiples files
  • Hey there,

    I have an application in Kohana that uploads multiple images, and then present them as slides. Currently the application does upload the image by using the image module Forge. I wonder if I can upload more than one image at a time using the Forge.

    I've searching several references but i've found nothing. Has anyone done this?

    Grateful for any help.

  • name your inputs like <input type="file" name="file[]">, add as many fields like this you want, the browser and PHP will do the rest

    also, you may try and use the new HTML5 flavored input with multiple property <input type="file" name="file[]" multiple>

  • Oh, Thank's very much! That will work.

    But i was wondering if there's some way to do this using just the Forge module. Currently, i've been used something like this:

    $ form->upload ('file', TRUE)->label (utf8_encode (File E-Pub of Contents: * '))->rules (' required | size [20MB] | allow [epub, sea] ')

    But this way, he accepts just one upload at a time.


  • I have some more doubt in that. Can u give the Controller and View page codes .

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion