Flash File Uploader – Allow All Filetypes

flashfileuploader

A [d]online reader recently requested that the Flash File Uploader allow provision to upload all filetypes. And while I’d previously decided against such an option—due to security/malicious action issues, this was not the first time I received such a request. In fact, since the uploader was created a few years back, I’ve gotten dozens of requests for this feature. As such, I’ve decided that my disclaimer for downloading the uploader should adequately cover me from any litigation and wrote the feature into the latest version of the uploader.

For people wishing to just use the uploader without understanding the changes, simply add “all” as an item under the extensions flash variable in the swfobject embed code:

fo.addVariable("types", "video|text|pdf|audio|archive|office|image|all");

For those that wish to know the changes, the Flash loop that adds the array extensions to the “allowed” list also looks for the “all” option and changes a variable to true, if all filetypes are allowed. This is then passed to “upload.php” and skips the extensions test. Lastly, it’s passed to index.php to properly display the success message.

For your convenience, the link is the same as the last one.

Comments and feedback always welcome. Thanks again, Mike, for the assistance and to all the [d]online readers and commenters for your interest in the FFU and readership.

8 Replies to “Flash File Uploader – Allow All Filetypes

  1. hi don… I want to know how we can increase the sizefile… or remove the limit size…

  2. Hi Don,

    First, let me say that this is a great little application, and that we really love it.

    I was just wondering, have you ever come across a problem with Kaspersky Antivirus blocking the uploads? (or come up with a work-around for it?)

    I eventually had to add a little block of code to the uploader checking for a response from the server, and if it doesn’t receive this response (which is doesn’t if Kaspersky is installed), it displays a warning about Kaspersky’s proxy blocking file upload scripts.

  3. Hi Jason, Thanks for the reply and the kind words. I’ve never used Kaspersky Antivirus.

    My Flash Guru, Zeh Fernando, said this: Truly odd, but I’m not too surprised. Kaspersky is one of the most touchy antiviruses out there, and it’s quite frequent that it indicates certain executables that are perfectly legit are instead viruses (a false positive).

    This option to disallow uploads is probably some additional, advanced option – to disallow sending personal data or something. At least I hope so.

    I also did a quick search and found a number of others complaining about the same thing (ie. http://bit.ly/9N2cEs).

    This result shows some recommended code to fix the problem, however, would you mind posting your block of code in case other users are finding the same issue? Thank you.

  4. Hi Don
    I have problem.
    When file is 100% send i have ERROR

    Error:

    The file could not be uploaded.

    FILE: DSC03892.JPG
    TYPE: .JPG
    SIZE: 3538944
    ALLOWED: yes

    Sorry for my language :]

    is allowed, file size is ok, i have no idea what is wrong.

    Regards

  5. The upload PHP file prints out an errorlog.txt file in the same directory as the PHP file. Can you tell me the output of this file? That may assist in letting us know the reason. Did you update your PHP.INI file to have max size to permit a 3.5M file?

Comments are closed.