image icon indicating copy to clipboard operation
image copied to clipboard

Allow error message to be display in notice

Open mpandzo opened this issue 5 years ago • 8 comments

Allow error message to be returned from server side (and displayed in notice) together with success: 0 in the following form:

{
     "success": "0",
     "message": "File too large"
}

cc @neSpecc

mpandzo avatar Dec 09 '19 14:12 mpandzo

@neSpecc any news with regards this? Thanks.

mpandzo avatar Dec 16 '19 16:12 mpandzo

This would be really nice. I'm currently factoring my code to support this format, makes a ton of sense.

tylerwiegand avatar Apr 02 '20 22:04 tylerwiegand

Would be fantastic if this could be merged. A custom error message is badly needed (especially because the current error message is grammatically wrong).

hagemann avatar Apr 08 '20 14:04 hagemann

any news?

syssam avatar Feb 15 '21 07:02 syssam

I, too, think this is an important change that should be made. My main use case for it is for when a user's session expires (or they log out in another tab). Currently, the message they get when an upload fails in this scenario is "Couldn’t upload image. Please try another.", which causes users to think that there's something wrong with the particular image they chose. It would be nice to be able to tell them that they're logged out and need to log back in.

ataylor32 avatar Jun 04 '21 13:06 ataylor32

Hi! any news about this? ATM error message displayed by notifier cannot be customized in any way.

asaldanam avatar Sep 05 '22 07:09 asaldanam

Hey @mpandzo can you pls provide the access to your fork so I can update the PR.

robonetphy avatar Dec 20 '22 02:12 robonetphy

I've submitted another PR to implement this improvement: https://github.com/editor-js/image/pull/245.

tech-magnety-ai avatar Apr 28 '24 14:04 tech-magnety-ai