Sorry... I can't deal with all the SPAM so until I can find a better solution for the forums, I'm locking them down. For now please use awesome services like stackoverflow.com for community support. Thanks.
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.
Implementing dynamic sizeLimit depending on file extension
  • I just want to set as per following:-

    Picture (jpg,png etc.) -> 200KB

    Document(doc, xls, ppt, etc) -> to 2MB

    Audio(mp3, wma, etc,) -> 42 MB

    Video (mp4, wmv, etc.)-> 225 MB

    And if user attempts to upload files that exceed that limit display a message in the form 'Maximum file size for Video is 225MB'

    1. Does uploadify support for this ?

    2. Are so large file sizes supported? What is the uploadify upper limit (assuming no other parameters are putting any upper limit).

    Thanks.
  • You could do this inside of onSelect. Set up a switch call and for the respective file type that exceeds you size limits call uploadifyCancel on the queueID returned by onSelect.

    ie you will need to fill in the blanks

    onSelect: function (event, queueID, fileObj) {
    var ext = ....extract file extension from fileObj.name and set to lower case...;
    switch (ext) {
    case 'mp3':
    case 'wmv':
    case 'avi':
    if (fileObj.size >= ...maximum filesize in bytes....)
    $('#yourID').uploadifyCancel(queueID);
    break;
    case 'doc':
    ... keep going with your options...
    default:
    break;
    }
    },



    Regarding large file sizes, I have successfully uploaded files over 700mb. But it will depend on your server settings.
  • I gave this a shot, and I even added the "return false;" line after "$('#yourID').uploadifyCancel(queueID);". What's happening for me (and what I've seen in a few other forum posts) is that while the HTML is not added to the page, if you click "submit", the file is uploaded anyway.

    I know I can do a check on my processing file so that the file is ignored, but I'd rather it never was uploaded in the first place.

    I'm using Chrome 10.0.648.204 and Firefox 3.6.13. (Uploadify 2.1.4)