Feedback

About Designerfoo and Me!

I am Manoj Sachwani, a webmaster, wannabe illustrator, designer, developer, amongst other things. I have over 14 years of experience, developing, designing and deploying websites. I am geeky, hairy and and I love what I do.

I stumbled & bought this domain - Designerfoo.com - because I thought it would be a "cool" domain to have, as time went on, I realized that I want to become - "Designerfoo" - and grow my knowledge in design, illustration, web design and web development.

I am webmaster, I design and develop websites with an edge. How may I help you?
Contact   -   @designerfoo   -   Facebook
Who is

Howto: CodeIgniter + Uploadify

Comment(s)
Please wait while you are redirected...or Click Here if you do not want to wait.
Subscrive via feedburner rss

Subscrive via feedburner email
33 Responses to “Howto: CodeIgniter + Uploadify”
Comment History Slider
    May 16, 2013 at 7:44 am
    Author: Mostafa

    Hi,
    First thanks about source.
    I download that and test it ,but don’t upload any images to my folder and my json is null.
    what do I should to do?
    :(

    September 26, 2011 at 7:05 pm
    Author: Josh Knight

    Hey, thanks for the tutorial. Like Althalos, I also need to process (rename, resize, make a thumb and store the paths in a database.) But, I’m a little confused on how to go about that exactly….shoot, wait, I just reread the post from Althalos for the 100th time and I think I might get it now. Does the flow go like this:

    1. Each time an image is uploaded to the server using Uploadify, the uploadify function is called in the controller.

    2. When the controlled function is called you set up all the normal image manipulations and database inserts.

    Does that sound about right?

    Thanks again,

    Josh

      September 26, 2011 at 7:32 pm
      Author: Designerfoo

      It sounds good, you can code the resizing bit with GD or ImageMagick too, if thats installed and working on your server :)

    September 4, 2011 at 10:54 pm
    Author: Jacob

    Hmmm sorry mabe for stupid question but I dont understand the form_open_multipart(’upload/index’); because I dont have any “upload” controller so where does it go :P

      September 26, 2011 at 7:34 pm
      Author: Designerfoo

      Hi Jacob, not following here, the form_open_multipart actually creates an action that POSTs the form to the controller called Upload and relays it to the index method of the controller. As for multipart forms, you will find more info here.

    August 30, 2011 at 6:38 am
    Author: angela

    Hi! I implemented this code and it works fine with images and docs but whenever i’m trying to upload a video file, the video is not uploaded. it does not return any error. i thought maybe it was a routing problem but when i changed the file extension accepted for that directory, it uploaded well in that directory. why can’t video files be uploaded?

      September 26, 2011 at 7:36 pm
      Author: Designerfoo

      Hi Angela,

      You need to make sure the extensions of the files that you are trying to upload are added within the array of allowed extensions, the current code only supports images and docs. Also check the mime type is supported by your CI version and that it is included.

    April 19, 2011 at 4:23 am
    Author: manender

    i have download this code but when running it i am getting this error(below) and also file is not uploading to the given folder.

    A PHP Error was encountered

    Severity: Notice

    Message: Trying to get property of non-object

    Filename: views/uploadify.php

    February 27, 2011 at 10:53 am
    Author: vamsi

    Hi, is there a way to utilize CI’s upload class with uploadify ?

      March 11, 2011 at 3:44 pm
      Author: Designerfoo

      Hi Vamsi,

      You may be able to hack and make it work, I am not aware of any other way to make it work since uplodify uses its own script to doing so, but I may be wrong, the new version may let you add a custom function to do so?

    August 8, 2010 at 9:26 pm
    Author: vipercat

    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

      September 2, 2010 at 7:44 pm
      Author: Designerfoo

      The directory you are trying to upload to does not exists OR there’s a problem with perms.

    August 5, 2010 at 6:58 pm
    Author: Alf

    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.

      August 5, 2010 at 8:49 pm
      Author: Designerfoo

      Can you mail me the link? So I can check what’s up?

        November 15, 2010 at 10:07 pm
        Author: Tom Nagen

        Hi,Thanks for the script it’s great,I am having the same problem with the progress bar not showing did u manage to figure what was causing the Alf was having?

        November 26, 2010 at 6:41 am

        hi every thing works fine for me but the progress bar is not working.

    July 20, 2010 at 7:36 pm
    Author: Trutz

    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!

      August 5, 2010 at 8:48 pm
      Author: Designerfoo

      Thanks TRUTZ! :)

    July 18, 2010 at 8:52 am
    Author: Althalos

    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!

      July 18, 2010 at 9:16 am
      Author: Althalos

      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.

        July 20, 2010 at 7:27 am
        Author: Designerfoo

        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!

    July 8, 2010 at 7:38 pm

    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?

      July 13, 2010 at 5:25 am
      Author: Designerfoo

      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.

        July 14, 2010 at 8:18 am
        Author: light_tuner

        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!

        July 14, 2010 at 9:23 am
        Author: light_tuner

        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!

        December 5, 2010 at 3:35 pm
        Author: M

        I’m afraid but I can’t get it work. I always get the error “Trying to get property of non-object”.
        Any help would be appreciated.

    May 16, 2010 at 3:07 pm
    Author: Mr-H

    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?

      May 22, 2010 at 9:43 am
      Author: Designerfoo

      THe lost session problem may be because of a lot of things, can you mail me something to look at via email?

    May 6, 2010 at 6:58 pm
    Author: jozan

    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. :)

      May 22, 2010 at 9:44 am
      Author: Designerfoo

      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!

    May 3, 2010 at 7:25 am
    Author: Fred Lin

    Kudos to you. You have just changed alot of CI designer/developers lives. ;)

      May 6, 2010 at 6:19 am
      Author: Designerfoo

      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!

    December 10, 2010 at 7:07 am
    Author: Designerfoo

    Hi M,

    Think the issue is that the javascript library is not being loaded correctly. Did you set the path right?



Leave a reply :)

Name:

(required)

Mail (will not be published):

(required)

Website:

Comment:


Eventify – Simple Events

NextGEN Resize Wordpress Plugin

Thanks to Subscribers

Thank you for taking the time out.

  X Close Feedback.