Multi File Upload with CI |
[eluser]psychomarine[/eluser]
I solved my own problem, Moderators, Kindly please Remove this thread. My Apologizes.
[eluser]nEJC[/eluser]
Ah, why remove anything? Instead of removing the question - why don't you also provide the answer/solution? Maybe someone else could learn from this ... Quoting your original question: Quote:... Hope you see the value in providing the info ...
[eluser]psychomarine[/eluser]
because I didn't want to double post. There is already a thread on the same problem that I missed before and accidentally came upon it. That made my thread, basically a duplicate thread, which is kinda pointless. Hope you understand.
[eluser]psychomarine[/eluser]
the solution was discovered on this page. Sort of unrelated of course but I discovered my problem with this. http://ellislab.com/forums/viewthread/121434/ Now, Ill go ahead and make this easy for everyone. The problem is, most of the tutorials and doc's tell you to do this: Code: public function do_upload() Well, out of habbit, me and many other people, like to load our things in the __construct() and keep it uniform. I however did not realize, as many others that by doing: Code: public function __construct() messes up when you call it a 2nd time, as shown in the first example. Now I can only assume that codeigniter has implemented some sort of singleton method, which is smart I might add. For those who dont know, a singleton basically allows one instance of a class to run preventing a 2nd instance from initializing. (basically because it goes alot deeper than that in some cases) Now, what was happening was that the __contruct was loading the upload class first, ignoring any config I tried to feed into it later on. Now, removing the initial loading of the upload class solved my issue. There is also a second fix, as referenced in the user guide, for those who like to load everything needed in the __construct: Code: // Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class: Hope this helps anyone who has issues. Its a good starting point when you think everything is correct and it just wont work properly. It can be annoying because we KNOW it works, else theres low chances on them releasing it to the public if it doesnt work at all. in closing, seems to be a case of "pebkac" Thanks. |
Welcome Guest, Not a member yet? Register Sign In |