Howto: CodeIgniter + Uploadify
I had a requirement where, I needed to fuse uploadify and codeigniter to gether, so I started looking at these tutorials online. I found some to be very complex and gave up on trying to use these to fuse both together. Here’s a video how-to for using Uplodify with your CodeIgniter based website/blog.
Codigniter+Uploadify
Howto: CodeIgniter + Uploadify.
PS: The source code contains, complete CI site with uploadify working. If you have any questions, comments do let me know via the comment box down! Thanks.
Tags: CodeIgniter, Codeigniter forms, Codeignter uploadify, Development, multiple upload codeigniter, PHP, Uploadify+Codeigniter
The directory you are trying to upload to does not exists OR there’s a problem with perms.
Thanks for this tutorial!
I am having just one issue: The progress-bar is not showing. The path for the CSS and JS’s are good. The files are uploading and the percent is running but the horizontal line and the gray box no. I’ll appreciate any help.
Can you mail me the link? So I can check what’s up?
For all who get the “Trying to get property of non-object … ” error and use a CI installation on your local computer, e.g. with XAMPP:
Just replace the following line in the views file welcome_message.php
folder: ’system\application\uploads’,
with this one
folder: ‘/your/path/to-your-upload-folder’,
This worked for me!
Great tutorial!
Regards!
Thanks TRUTZ!
I wonder if there’s a method to be able to get access to the CI libraries and models inside of uploadify.php, I need to write the uploaded files to the database and preferably also do some image cropping/scaling with the CI image class.
Thanks for a great article though, the uploadify part worked flawlessly for me!
No wait… I am terribly stupid. Really. I suppose the best way to write the info to the database and do operations would be to put that code in the uploadify method that is inside the controller and outputs back the Ajax results.
Yup, that is right, you can do that without the ajax also if you want do to so, from within the callback itself. Hope this helps!
Hey,
Ive been trying to get your source files to work, but I keep getting this error;
“Trying to get property of non-object
Filename: views/uploadify.php
Line Number: 3″
… and line 4, 5, …
basically it seems he’s not getting the json echo’s, but he is trying to read them.
But I dont know how to fix this, any ideas?
Ok, the thing is that the there should uploadify.php present in the views directory, which currently It can’t find. Check your config.php for the base url.
Thanks a lot for great tutorial and files.
I am still getting the same error than MR-H, even if I have the right path and file in the right place..
Isn’t it a problem with Json object?
When I use print_r($data['json']) in the controller I get ‘1′ as output value
Any help would be appreciated. Keep on the good work!
Sorry for the troubles; I have replaced the whole uploadify folder in CI system/application and it now works like a charm.
(for those interested, I read in CI forum it might be an issue with uploadify.swf and the way it passes data back using ’scriptURL’ httpRequest variable..)
Thanks again!
hi thank you for this
fuse ci with uploadify is simple the trick is how to handle the onComplete fontion.
but i have a probléme that when i upload a file i lost session
i dont know why? and if i look in ci session (ci_session) i found that the table content 3 records!!
any idea?
THe lost session problem may be because of a lot of things, can you mail me something to look at via email?
I think you need a better mic. There is too much noise in audio and your voice is hardly audible time to time.
Anyway, thanks for tut.
Hi Jozan,
I apologize for the bad audio, I will get a better mic and be much more clear with oncoming tuts! Hope this helped!
Kudos to you. You have just changed alot of CI designer/developers lives.
Hey Fred,
Thanks, I had added the complete CI install fused with CodeIgniter already to give you and others a head start, hope that helps!















Every website I design/develop, I follow some essential steps to make your time and investment count. From free consultation to free post-production support. 
I like this tut!
Thnx for the effort!
The script works fine, but doesn’t upload the file. And it’s not displaying some error.
Firebug (about the POST action):
Unable to move ‘/var/spool/php/php21L6Ti’ to ‘/var/services/web/uploads/06102009026.jpg’
I don’t know where to look for.
Regards