filestack-js icon indicating copy to clipboard operation
filestack-js copied to clipboard

Warnings not being shown to users

Open IanVS opened this issue 5 years ago • 8 comments

I've set a max filesize on my picker, and am finding recently that when choosing a file that exceeds that limit, nothing happens. It is not accepted (correct behavior), but there's no error shown to users to let them know what happened.

I've also tried using onFileSelected to manually show a warning, and that doesn't work either:

filepickerClient
    .picker({
        onFileSelected: (file) => {
            console.log(file.size);
            throw new Error('Not accepted');
        },
    })
    .open();

And I see the filesize in the console, but still I don't get any kind of message in the UI.

IanVS avatar Feb 27 '20 15:02 IanVS

@IanVS scroll the browser to top and try again. Looks like its a bug in the positioning of message

akalongman avatar Mar 12 '20 17:03 akalongman

@akalongman You're right, the message seems to be positioned at the top of the body or something, so it doesn't show up if the page is scrolled down before the picker modal is opened. The message should be positioned to the top of the viewport (position: fixed, I guess).

IanVS avatar Apr 16 '20 14:04 IanVS

I don't think this is an enhancement, it's a bug if users cannot see error messages and are left to wonder why their files are not uploading, right?

IanVS avatar Apr 23 '20 14:04 IanVS

Definitely it a bug.

akalongman avatar Apr 23 '20 15:04 akalongman

Hi, we'll fix it in future release.

maryfs avatar Apr 27 '20 05:04 maryfs

Use this css it will be fixed

.fsp-notifications__container { position: fixed; }

image

MuhammadGoharKhan avatar Jul 14 '20 06:07 MuhammadGoharKhan

@MuhammadGoharKhan thanks the following worked for me added !important. .fsp-notifications__container { position: fixed !important; }

mrshahrukh123 avatar Dec 10 '20 12:12 mrshahrukh123

Any news on this ? The workaround works but it could be fixed at the library level

edouardmenayde avatar Jan 29 '24 10:01 edouardmenayde