CodeIgniter Forums
Uploading PDF and IMAGE in same form - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Uploading PDF and IMAGE in same form (/thread-13691.html)



Uploading PDF and IMAGE in same form - El Forum - 12-02-2008

[eluser]bennyhill[/eluser]
In a product form, I have fields where a user can upload an image as well as a pdf.

I figured out how to have both files upload successfully to the same directory, but I would like images to go to an images folder, and the pdfs to a pdf folder. How would I change the upload path for the pdf in the model function? Let me know if I should post my code.


Uploading PDF and IMAGE in same form - El Forum - 12-02-2008

[eluser]bennyhill[/eluser]
Well this is the 10th time I ran to the forum too quick. I figured it out. I just needed to create a new config array ($phpConfig) and initialize it before I did the pdf upload $this->upload->initialize($phpConfig).