CodeIgniter Forums
File/Image upload using subdirectories - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: File/Image upload using subdirectories (/showthread.php?tid=43628)



File/Image upload using subdirectories - El Forum - 07-18-2011

[eluser]Unknown[/eluser]
I have project where I have created a sub-directory for the "backoffice" called backoffice in both the controller and view folders.

I have a view with a form for uploading an image, and a controller for processing the upload, both in the respective backoffice folders and I keep getting the “You did not select a file to upload” error.

I have checked and double checked the code and made sure I put the field_name in the do_upload() function, the path is correct and writable, etc.

I then took the files in question and moved them to the top level of Controllers and Views and the upload process works fine (no changes in code except for the action url of the form)

Any ideas why it won't work when placed in a sub-directory and/or ideas of how to get it to work from the sub-directory

Thanks,

Paul


File/Image upload using subdirectories - El Forum - 07-19-2011

[eluser]Aken[/eluser]
Has to be either a path or permissions issue. Not much else we can say without knowing your whole setup.


File/Image upload using subdirectories - El Forum - 07-19-2011

[eluser]LuckyFella73[/eluser]
More help would be possible after seeing your controller and view
code. All in all it sounds strange that the selected file is only
seen when your controller and view file is saved in an other folder.