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

"1 Unexpected EOF" error on uploading specific image

yataras opened this issue · comments

Expected Behavior

The error message should occur on the browser's view. An image should not be uploaded.

Current Behavior

The error message occurs on the browser's dev tools. An image is uploaded.

Possible Solution

It would be better to cancel uploading corrupted images. In such case, onFileUploadFailed callback could be triggered.
Or there should be some additional way to catch such errors.

Steps to Reproduce

  1. Download the corrupted photo from here.
  2. Go to https://jsfiddle.net/q7supnwa/3, click Select Files to Upload and chose uploaded in the previous step picture, and click upload.
  3. Open console in devtools and there should be an error.

Additional Screenshots

  1. Error in devtools console
  2. Place in the code where the error is thrown.

Context

An issue with ignoring corrupted files causes another problem in further steps when we try to read that file. When you update image via filestack's filepicker without any change and re-upload it, everything works fine.

Your Environment

  • Version used: ^3.25.0
  • Browser Name and version: Version 110.0.5481.100 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Ubuntu 20.04 LTS
  • Link to your project: https://jsfiddle.net/q7supnwa/3