node-fetch/fetch-blob

Behavior of .slice() is incorrect when using blobs backed by a file on the disk

monster860 opened this issue · 0 comments

When using something like the fileFrom(), the behavior is incorrect. .slice() breaks if used more than once.

blob.slice(10, 40).slice(10, 20) should be equivalent to blob.slice(20, 30), and it is if you use a blob that's backed by an arraybuffer, however when using a blob backed by a file on the disk, it becomes equivalent to blob.slice(10, 20) instead.