filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

cleanupImageExif causes an error `Unexpected byte at segment start` for specific image #497

Open MaxFedas opened 1 year ago

MaxFedas commented 1 year ago

When I try to upload specific photo with cleanupImageExif option on, picker throwі an error, but seems like it doesn't influence the photo uploading.

Expected Behavior

no error in browser console

Current Behavior

error Error: Unexpected byte at segment start: 0xFD (offset 0x1DE983) appears

Possible Solution

add additional handler for such kind of error

Steps to Reproduce (for bugs)

  1. Save one of the images https://drive.google.com/file/d/1nvnmh0HnZFu77Ug2W8wgdulqmZ1_Y6L0, https://drive.google.com/file/d/1SZhrgHLyQGedRoatkLOfln0WrdbUbYUN
  2. Go https://jsfiddle.net/dark_ok/g48165j2/6/, click Select Files to Upload and chose on of this picture and click upload.
  3. Open console in devtools and there should be an error

Additional Screenshots

  1. https://drive.google.com/file/d/19-jcPkDrYyWvBp_X9rUftah5ZzihxY9v

Context

It does not break anything, just unhandled error in console. How to avoid it? Seems like something is wrong with exif of those files, because witthout cleanupImageExif option or for other image there is no such error.

Your Environment