bentham
bentham

Reputation: 1717

How to add more file types to the FancyUpload plugin?

I am trying to modify the FancyUpload plugin to accept the following files extensions.

I have already searcher, but all the topics about this are outdated, and it doesn't work. This plugin has two files, index.php and scrip.js, where there are the same filter. I have already changed that with this but nothing works.

This is what I have tried so far:

index.php

    $('demo-browse').addEvent('click', function() {
        swiffy.browse();
        return false;
    });

    $('demo-select-images').addEvent('change', function() {
        var filter = null;
        if (this.checked) {
            filter = {'docs (*.jpg, *.jpeg, *.txt, *.gif, *.png, *.doc, *.docx, *.pdf, *.xlsx, *.ppt, *.pdf)': '*.jpg; *.jpeg; *.txt; *.gif';*.png, *.docx, *.pdf;*.xlsx;*.ppt;*.pdf};
            //filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
        }
        swiffy.options.typeFilter = filter;
    });

script.js

    $('demo-browse').addEvent('click', function() {
        swiffy.browse();
        return false;
    });

    */
    $('demo-select-images').addEvent('change', function() {
        var filter = null;
        if (this.checked) {
            filter = {'docs (*.jpg, *.jpeg, *.txt, *.gif, *.png, *.doc, *.docx, *.pdf, *.xlsx, *.ppt, *.pdf)': '*.jpg; *.jpeg; *.txt; *.gif';*.png, *.docx, *.pdf;*.xlsx;*.ppt;*.pdf};
            //filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
        }
        swiffy.options.typeFilter = filter;
    });

Upvotes: 0

Views: 407

Answers (1)

bentham
bentham

Reputation: 1717

Just visited this page, and copy the script there: solution, but I still dont figure out other things but well, fancyupload has a avandced coding

Upvotes: 1

Related Questions