Upload Error 1? - 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: Upload Error 1? (/showthread.php?tid=51228) |
Upload Error 1? - El Forum - 04-25-2012 [eluser]Matalina[/eluser] Not so much asking for help. But when I'm moving working code to another location with some tweaks and refactoring for a Intranet system where all apps are one unit instead of the 3 or 4 I have now as working models. It's no longer working. But I'm sure I can fix that. My question is what the error 1 mean when I upload. Nothing else is displayed, just a 1. My error message output: Quote:Images caused a failure to creating a new promotionMy error output code: Code: $this->session->set_flashdata('error','<div class="alert-box error">Images caused a failure to creating a new promotion<br/>'.print_r($this->upload->display_errors()).'</div>'); I've gotten it before and it's been permission issues, I think but it's been a while since I did this part of the code so the exact fix is not in my memory. I"ll post it once I fix it but I'm curious why 1 and why no translations and wonder if we might be able to get a better message for an error. Upload Error 1? - El Forum - 04-25-2012 [eluser]Matalina[/eluser] echoing the error before doing my check gave me a human readable message. just bizarre. You are not allowed to upload this file type. However my file types were set to jpg|jpeg|gif|png and I was uploading a jpg. I changed the allowed types to * and now it's working. Great - not! fun fun. Upload Error 1? - El Forum - 04-25-2012 [eluser]Matalina[/eluser] What am I missing? IMGS_PATH is set to the right path with a trailing slash uploading a 344KB jpg file. error message: Quote:The filetype you are attempting to upload is not allowed. Code: // Upload images & resize Upload Error 1? - El Forum - 04-25-2012 [eluser]Matalina[/eluser] Not the optimal way but I got it working. allowed_types = * and check the file extension before do_upload. |