Project

General

Profile

Actions

Bug #6023

closed

File Upload: Client (Browser) zeigt keine Fehlermeldung an

Added by Carsten Rose almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Benjamin Baer
Target version:
Start date:
16.05.2018
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
Vote:

Description

Wird versucht eine Datei hochzuladen (QFQ FormElemnt 'Upload'), die einen Fehler ausloest (z.B. unerlaubter Mime Type), sendet QFQ eine JSON Status. Z.B.:
{"message":"<table class='table table-hover qfq-table-80'><thead><tr><th colspan='2'>Error<\/th><\/tr><\/thead><tr><td>Timestamp<\/td><td>2018.05.16 21:11:10 +0200<\/td><\/tr><tr><td>Code<\/td><td>1502<\/td><\/tr><tr><td>Message<\/td><td>Filetype not allowed. Allowed: application\/pdf<\/td><\/tr><\/table>","status":"error"}
  • Das JSON ist in QFQ 0.25.11a und 18.4.4 sehr aehnlich.
  • In 0.25.11a kommt noch der alte drop down Dialog (upload.message.ok.png) - ok.
  • In 18.4.4 kommt kein Dialog, dafuer wird ein spinning gear angezeigt - error.

Koenntest Du Dir das mal anschauen?

  • Ich koennte mir vorstellen das alle Versionen mit den 'neuen' Alerts betroffen sind.
  • Es ist relativ dringend, es gab schon einige Beschwerden (PT2, LK, GRC).

URLs zum testen:
1) OK: https://webwork16.math.uzh.ch/lehrkredit/cr/
2) Broken: https://webwork16.math.uzh.ch/lehrkredit/work/
3) Broken: https://webwork16.math.uzh.ch/my

Bei 1 & 2: einloggen mit shortname Password > Admin / Pool > Status: 95 > Request > Uploads to request: Applicant, Admin - NEW > Upload > Filetype: ALL > 'file das kein PDF ist auswaehlen'> BANG


Files

upload.message.broken.png View upload.message.broken.png 39.1 KB QFQ: 18.4.4 Carsten Rose, 16.05.2018 21:22
upload.message.ok.png View upload.message.ok.png 96.3 KB QFQ: 0.25.11a Carsten Rose, 16.05.2018 21:22

Related issues

Related to QFQ - Bug #5843: File Upload: Handhaben unzulässiger DateitypenClosedElias Villiger20.04.2018

Actions
Related to QFQ - Bug #6139: File Upload: keine Fehlermeldung wenn Datei zu grossClosedCarsten Rose04.06.2018

Actions
Actions #1

Updated by Carsten Rose almost 6 years ago

  • Related to Bug #5843: File Upload: Handhaben unzulässiger Dateitypen added
Actions #2

Updated by Benjamin Baer almost 6 years ago

Workaround fix, not sure why it doesn't work the proper way.

Message still looks bad, with the table and all. Looks more like it wants to tell you that the webserver just exploded instead of just saying that you uploaded the wrong file.

Propose change:
Return message as an object.
message.title = Error
message.text = Filetype not allowed. Allowed: application\/pdf
message.errorCode = Monkey
message.timeStamp = 2018.05.16 21:11:10 +0200

Quick workaround:
message = "<b>Error</b><br>Filetype not allowed. Allowed: application\/pdf"

Actions #3

Updated by Benjamin Baer almost 6 years ago

  • Status changed from New to Closed
Actions #5

Updated by Benjamin Baer almost 6 years ago

  • Related to Bug #6139: File Upload: keine Fehlermeldung wenn Datei zu gross added
Actions

Also available in: Atom PDF