upload icon indicating copy to clipboard operation
upload copied to clipboard

Really bad UX when not allowed to download file, in particular in Firefox

Open clarkwinkelmann opened this issue 6 years ago • 0 comments

  • flagrow/upload extension version: 0.6.0
  • flarum version: 0.1.0-beta.7.1
  • upload adapter causing issues: irrelevant (tested with local)
  • mimetype configurations: irrelevant

If for example guests are denied download ability but some public posts include downloads, the experience is awful. The download button offer no indication of the permission and the API download call returns a 401 error, but as the payload is json the browsers have different ways of rendering it to the user.

Chrome simply displays the JSON payload, not too bad:

image

But Firefox shows its own error page, which seems to be the same for 404 or 401

(Screenshot in French, reads "File not found")

image

This is very confusing, in particular when debugging. The download endpoint should probably return some text/html response in case of 401 errors

clarkwinkelmann avatar Mar 26 '18 21:03 clarkwinkelmann