This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
Customize uploadify?
  • Hi

    I'm having some trouble with uploadify.. I want to do the following for an picture cms:
    - LIMIT the uploads to 5 (basically limit via an variable) so when a user uploads 5 pictures, the button dissapears, but when he deletes 1 picture he can add another one. This while still allowing the user to upload multiple files at once.
    - process the pictures (resize to 800x600 or equivalent) and create a thumbnail for each one, give them an microtime() name and store them in the database
    - return the thumbnail as a small picture. Basically, instead of returning rows in the queue,I want to return thumbnails of the uploaded pictures and their id from the database so I can :
    - DELETE the picture and thumbnail from system and database when the user removes them from the queue.

    I would like to know if this is possible (I bet my *** it is!) and if you could please clarify what role does each file have for uploadify. Example, check.php I know checks for duplicates, but what does that file have to return, and how is that info being used. The same for uploadify.php.

    Thank you very much for your time. :-)

    ps: I'm quite new to JS,jQuery...
  • Much of what you want to do has to be done back-end with php or w/e you are using. As far as front-end is concerned:
    .. making the button disappear, you can do something like $("#SWFUpload_0").hide(), it's the swf object ID, I'm not sure how well it is gonna work though.

    ..if you use microtime for file names, then check.php is not needed, you can discard it.
    ..uploadify.php is the file which saves each of your images to the server and with 'postData' you can pass additional info to the back-end and to display the result, e.g., the thumbnail you can do something like echo "
    ...
    " inside the php script, and then pick it up via ajax or uploadify events(if server response was passed, i'm not sure if it was though, but check documentation for onUploadSuccess() or one of those functions)

    For resizing and thumbnail generation check imagemagick which is prefferred over gd library.

    And it would be also handful to check out $.ajax() in jQuery, they have all the documentation on their website with all the examples.

    In StackOverflow.com there are pretty much answer to most of the things and solutions you are searching for. But I'd rather experiment myself with stuff.

    Anyway, good luck!
  • georgealex17 said:
    I want to do the following for an picture cms:
    - LIMIT the uploads to 5 (basically limit via an variable) so when a user uploads 5 pictures, the button dissapears, but when he deletes 1 picture he can add another one. This while still allowing the user to upload multiple files at once.
    - return the thumbnail as a small picture. Basically, instead of returning rows in the queue,I want to return thumbnails of the uploaded pictures and their id from the database so I can :
    - DELETE the picture and thumbnail from system and database when the user removes them from the queue.


    The biggest problem is returning the picture id from the database so I can add it onto the page. I did some "digging up" and I would modify the flash so that instead of a random id for each upload, I would return the ID of the picture (in case it uploaded successfully). The "how-to" is getting the id back from the uploadify.php file (uploader file) to the flash actionscript. Doing that would allow me to both get the thumbnail with onmouseover event and also provide me with the information to delete both picture and thumbnail from the database/server.

    Any help there?

    Thanks for your reply reyyy :-)
  • uploadify lacks the ability to send back any data. Without getting into modifying the flash itself, what I'd try and do is create a temp file for that particular instance and send that file name to your backend script. When the backend script processes the thumbs and adds them to the DB, have it append the id to that file. When uploadify triggers the all complete function, launch some ajax to grab that file and get the info you want to display on your page etc. It's a real pain in the ass not being able to get data back.