last day (15 days later) » 

7:52 PM
0
Q: Upload issue in Codeigniter

George MoldovanThis is the html part: <form action ="<?php echo base_url(); ?>home/register_doctor" method ="POST" enctype="multipart/form-data" accept-charset="utf-8"> ... <input id="file-0" class="file" type="file" multiple data-min-file-count="1" name = "avatar" > ... </form> This is the the controller ...

 
Try printing the $_FILES variable, if the browser successfully uploaded the file it should be present there.
Also is the max_upload_size php ini setting set to a high enough value for your upload?
 
This is the result of var_dump of $_FILES : array(0) { } I put it on the of the function do_upload
It is: upload_max_filesize=512M in the php.ini
The size of the img is: 5.51 KB (5,651 bytes). It is the image that i uploaded on the post
 
And post_max_size is larger or equal than upload_max_filesize? If yes, then there's a problem on the client side. If you're using Chrome, you can use developer tools to check if the upload was actually made.
Question: are you submitting the form normally or via ajax?
 
I uploaded my php ini file on my post. Please check it. I do the upload WITHOUT ajax
I don't believe that the php ini the problem I do the upload using PHP functions and it works, but the CI functions does not and I am out of idea. Can you help me ?
 
Could you also post the whole form, or at least the pieces that lead to the form submission?
 
7:52 PM
hi
 
hello
 
thx for helping me !!!
 
hmm.. the form looks ok
I assume you're using Chrome, due to the "multiple" attribute
You can check via developer tools (F12 on windows), the network tab to see what gets sent to the server when you submit the form.
 
am using mozizlla
the 'avatar 'is empty
I check it with firebug
 
ok, looks like the form is the culprit
let me take a closer look :)
 
8:02 PM
sure
 
silly question: you select files in the file control, right?
try inspecting the control after you select them
document.getElementById("file-0").value gives anything?
 
nope
ok, I looked again at the form, if there are no other entities that affect the form, or if the rendered errors don't affect the form, you should be able to submit the file
take a look at the actual html output and see if you can find any clues
if the form doesn't send a file, that's clearly a client side issue
and as the file control looks ok, it's possible that something else modifies it or its contents
I have to go now, good luck with the investigation
and have a nice Easter :)
 
8:20 PM
yeah thx for your help:)
 

last day (15 days later) »