image upload |
[eluser]praveenarya[/eluser]
hi all, i have to upload image from page which looks like this Code: table width="90%" border="0" align="center" cellpadding="4" cellspacing="1" class="sborder"> my code looks like this Code: <?php
[eluser]BrianDHall[/eluser]
Here you go, from the manual on file uploading: Quote:$this->upload->do_upload() In your do_upload call you aren't passing a field name, but your file upload field is not called 'userfile' - so CI is looking for a posted file field that just doesn't exist. I think thats the only problem, I can't see anything else wrong.
[eluser]praveenarya[/eluser]
thanks for the reply it worked but i have a doubt what if i have two image fields one for original image size and one field for thumbnail image size do i need to write like this Code: $upload = array thanks
[eluser]BrianDHall[/eluser]
I'm afraid I'm personally not sure about doing multiple file uploads, as I use an unlimited file upload approach where I have Flash/javascript upload files one at a time to a script. However, you might want to make things more magical by using the image manipulation class: http://ellislab.com/codeigniter/user-gui...e_lib.html This way you can upload the big image and create the thumbnail automagically. However you might still want multiple files to be uploaded in one form - I just don't know that answer ![]() |
Welcome Guest, Not a member yet? Register Sign In |