filepond-plugin-file-validate-size icon indicating copy to clipboard operation
filepond-plugin-file-validate-size copied to clipboard

maxFileSize Error

Open hunterbit opened this issue 4 years ago • 4 comments

Hi to all, I have always this error when I use plugin

image

This is my code with maximum size to 40MB but when I upload one file it's return always error. Where I wrong?

pond = FilePond.create( inputElement , {
        acceptedFileTypes: [
            'image/*',
            'application/pdf',
            'application/msword',
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
        ],
        labelFileTypeNotAllowed: 'Il tipo di file non può essere caricato',
        fileValidateTypeLabelExpectedTypes: 'Sono accettati file di tipo IMAGE, PDF, DOC',
        allowFileSizeValidation: true,
        maxFileSize: '40MB'
    });

Thanks

hunterbit avatar May 20 '21 22:05 hunterbit

You have to register the plugin to use it.

rikschennink avatar May 21 '21 06:05 rikschennink

I use this code for enable plugin

FilePond.registerPlugin(
        FilePondPluginFileValidateType,
        FilePondPluginFileValidateSize
    );

hunterbit avatar May 21 '21 07:05 hunterbit

Please create a test case on codesandbox.io

rikschennink avatar May 26 '21 06:05 rikschennink

I don't to use never this service. Now I check How to use it

hunterbit avatar May 26 '21 11:05 hunterbit