topcoder-platform / forums

0 stars 0 forks source link

[$100] User can't upload BMP/PSD/TIFF/LOG files #335

Closed sdgun closed 3 years ago

sdgun commented 3 years ago

Steps

  1. Launch the application and login as copilot
  2. create new discussion and click on the file upload link
  3. Attach a BPM/PSD/TIFF/LOG format files
Failed to load resource: the server responded with a status of 500 ()
19:10:47.894 topcodereditor.js?v=1.0.0:233 EasyMDE: Received an unexpected response after uploading the image.500 ()
request.onload @ topcodereditor.js?v=1.0.0:233
19:10:47.908 

Actual behavior

Expected behavior

https://user-images.githubusercontent.com/4592712/103334128-4c43e580-4a96-11eb-9d97-756c87bb98b3.mp4

image

Environment - OS: 10 - Device (w/version): Laptop, Windows 10 - Browser Chrome 87.0.4280.88

jmgasper commented 3 years ago

Contest https://www.topcoder.com/challenges/30161331 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

jmgasper commented 3 years ago

Contest https://www.topcoder.com/challenges/30161331 has been updated - it has been assigned to obog.

This is an automated message for ghostar via Topcoder X

jmgasper commented 3 years ago

@atelomycterus - Can we look at this please?

atelomycterus commented 3 years ago

@jmgasper Please apply PRs: https://github.com/topcoder-platform/forums-topcoder-editor-plugin/pull/7 https://github.com/topcoder-platform/forums/pull/345

Thanks!

Fixed 'Something wrong...'. Vanila recognizes image format. It tried to prepare image before saving based on EXIF data (Exchangeable image file format). This includes optional resizing and re-orienting. So it thrown an exception because bmp couldn't be re-sized. Vanilla Image Resizer works only with png, jpeg, gif with default Uploader. We upload original files to Filestack without changes.

Image formats

Not all browsers support tiff image format. So it render as attached file by default (e.g Chrome/Opera doesn't support it, Safari - supports it). image

Comparison of web browsers: https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support.

jmgasper commented 3 years ago

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30161331

This is an automated message for ghostar via Topcoder X

sdgun commented 3 years ago

Verified.

sdgun commented 3 years ago

Verified in production. Example forum post: https://discussions.topcoder.com/discussion/1909/welcome