Project

General

Profile

Bug #6023

File Upload: Client (Browser) zeigt keine Fehlermeldung an

Added by Carsten Rose over 2 years ago. Updated over 2 years ago.

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

0%

Estimated time:
Discuss:

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

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

Related issues

Related to QFQ - Bug #5843: File Upload: Handhaben unzulässiger DateitypenClosed2018-04-20

Related to QFQ - Bug #6139: File Upload: keine Fehlermeldung wenn Datei zu grossClosed2018-06-04

Associated revisions

Revision 40c362ef (diff)
Added by Benjamin Baer over 2 years ago

Probable fix for error display

Revision b221dfc3
Added by Benjamin Baer over 2 years ago

Merge remote-tracking branch 'origin/master'

Revision c5ad93cc (diff)
Added by Benjamin Baer over 2 years ago

workaround fix. not sure why it can't call the function

History

#1 Updated by Carsten Rose over 2 years ago

  • Related to Bug #5843: File Upload: Handhaben unzul√§ssiger Dateitypen added

#2 Updated by Benjamin Baer over 2 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"

#3 Updated by Benjamin Baer over 2 years ago

  • Status changed from New to Closed

#5 Updated by Benjamin Baer over 2 years ago

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

Also available in: Atom PDF