another "multiple file uploading" thread... |
[eluser]Fenix[/eluser]
So I've been looking through a bunch of threads on the topic and I'm wondering if there is a simple way to do it. I have an image upload form that I would like to have a button to dynamically add more files to. So when a user clicks a button it would add another file input field to the form with JavaScript. I know this will work with text input fields by setting View: Code: <form action="<?=$action?>" method="POST" enctype="multipart/form-data"> And then the controller could give an array like: Code: Array Any ideas? I'm trying it now but no luck.
[eluser]Italo Domingues[/eluser]
Hello Fenix, let me get this straight, you want to make a button where the user can click and thus add more fields of type file to upload images, is it?
[eluser]Fenix[/eluser]
Yes but that isn't the hard part. That's easy. I was looking for confirmation that using a input name like image[] would work for multiple files. I have had no luck so far testing with Latavish's script (http://ellislab.com/forums/viewthread/80610/). Although I should still be able to dynamically make input names like image0, image1, image2, etc with JavaScript.
[eluser]Italo Domingues[/eluser]
Look, I'm building an e-commerce, and the client can make multiple upload images, is the same thing you are doing, and about your question, yes you can use the image image[] by javascript, I use the jquery functions to implement ajax and javascript, if you want to make the script so I made some test, maybe I can help you. |
Welcome Guest, Not a member yet? Register Sign In |