filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.

Home Page:https://www.filestack.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

MaxFedas opened this issue · comments

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

  • Version used: "filestack-js": "^3.25.0"
  • Browser Name and version: Chrome Version 109.0.5414.119 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Ubuntu 22.04.1 LTS
  • Link to your project: https://jsfiddle.net/dark_ok/g48165j2/6/