Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In WCF.Attachment._upload: Check mime type before passing file to Resizer.js #3059

Closed
TimWolla opened this issue Aug 27, 2019 · 0 comments
Closed

Comments

@TimWolla
Copy link
Member

Currently files are unconditionally passed to Resizer.js, leading to bogus error messages, because resizer.loadFile fails:

var promise = resizer.loadFile(file)

[WCF.Attachment] Failed to resize image "foo.pdf":
error { target: img, isTrusted: true, srcElement: img, currentTarget: img, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }

Ideally instead the mime type should be checked to be something resizable and the complete resizing logic skipped if it is not.

see also: #2770

@TimWolla TimWolla added this to the 5.2 milestone Aug 27, 2019
@dtdesign dtdesign modified the milestones: 5.2, 5.3 (next+1) Dec 25, 2019
@BurntimeX BurntimeX added this to Needs Triage in WoltLab Suite 5.3 via automation May 23, 2020
@BurntimeX BurntimeX moved this from Needs Triage to Enhancement in WoltLab Suite 5.3 May 23, 2020
WoltLab Suite 5.3 automation moved this from Enhancement to Resolved Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
WoltLab Suite 5.3
  
Resolved
Development

No branches or pull requests

2 participants