Welcome Guest, Not a member yet? Register   Sign In
Multiple File Uploads (A call to CI experts)
#1

[eluser]Mason Kessinger[/eluser]
I have been trying to locate concrete information creating a form that allows multiple file uploads but have yet to stumble upon a solution that allows for the following:

a) Build a form that allows for multiple file uploads (of course)
b) Allow for different configuration to be set on each field.
c) Error output accurate to each field and its configuration settings.
d) Easy to install (perhaps as an extension to the Upload library)
e) As easy to use/configure as the native File Uploading class that CI comes with.
f) Supported with as much good documentation as the rest of CI is. (Props to CI for being so well documented!!!)

It seems like there is a lot of discussion about this very subject but most of the examples I have seen fail in one or many of the above areas.

Maybe I am naïve and there is a good reason why this does not exist, but if we can come to a good solution to this problem I will gladly post it to the Wiki for others to benefit from. I feel that this is a very common issue that should have an easier solution that what is out there.

I am very much looking forward to some input on this issue.
#2

[eluser]Mason Kessinger[/eluser]
*bump*

Any perspective on this?
Does it exist already and I'm missing it?
Am I being a little bit naïve and asking too much?
Is this is an impossible goal (surely not)?

Really just trying to learn and if all goes well I give my word that i will add it to the Wiki for all to benefit from. Multiple File uploads would be such a huge benefit!

Smile
#3

[eluser]Dready[/eluser]
Hello,

If I were in your shoes (cool expression I read this day on another forum thread) I will take back the upload class and improve it to be able :

1/ to manage file arrays : things like :
Code:
<form action="upload" enctype="multipart/form-data" method="post">
    <input type="file" name="featured_image[]">
    <input type="file" name="featured_image[]">
    <input type="file" name="featured_image[]">
    <input type="file" name="featured_image[]">
    <input type="submit" value="Upload Images">
</form>

2/ to accept configuration data per file : like :
Code:
<form action="upload" enctype="multipart/form-data" method="post">
    <input type="file" name="somefile">
    <input type="file" name="someotherfile">
    <input type="submit" value="Upload all this">
</form>
and
Code:
//in controller
$this->upload->do_upload('somefile',$config_array1);
$this->upload->do_upload('someotherfile',$config_array2);

At last, I'll post this in "Ignited code" forum where nice people would enhance it :-) Just do it !




Theme © iAndrew 2016 - Forum software by © MyBB