upload icon indicating copy to clipboard operation
upload copied to clipboard

Descriptive Error when upload fails

Open mikejones3 opened this issue 6 years ago • 5 comments

It would be nice for the users if an upload fails due to the size of the image, that they are told the image was too large and we only accept blah blah blah sized images.

Right now it just says oops something went wrong.

mikejones3 avatar Jun 01 '18 15:06 mikejones3

Are you sure debug mode is off on your forum ?

When debug mode is on, all validation exceptions show as an error with ValidationException debug name. With debug mode disabled, those exceptions are shown as user-friendly texts.

clarkwinkelmann avatar Jun 01 '18 17:06 clarkwinkelmann

Pretty sure its off because I get a user friendly text pop up that says oops something went wrong. I will post a screenshot later when I get back to my laptop

mikejones3 avatar Jun 01 '18 17:06 mikejones3

Okay I did a few tests. If your image is above Flagrow Upload config but within php.ini allowed size you get this:

image

But if you exceed php.ini allowed size you get this

image

I suppose you're subject to option 2 above ?

If there's a PHP exception, we should be able to catch it and return a more friendly message. Maybe @luceos will be able to identify where to do this check more quickly than I.

Thanks for report, that's definitely something we should fix.

clarkwinkelmann avatar Jun 01 '18 18:06 clarkwinkelmann

Awesome, in the meantime, I need to edit my php.ini file. Do you know where I can find that on a nginx ubuntu server?

mikejones3 avatar Jun 01 '18 18:06 mikejones3

@mikejones3 /etc/php/fpm/php.ini but that might defer. You can create a phpinfo file on your website to see which php.ini fpm uses.

luceos avatar Jun 04 '18 11:06 luceos