PapaParse
PapaParse copied to clipboard
Support Blob instead of File in browser context
The documentation says that, for parsing local files, the function expects a File
as input. File
is actually a specialization of Blob
with additional fields for filesystem metadata -- file name, modification date, MIME type, that sort of thing. As far as I can tell, the parser never actually reads any File-specific properties, and should be able to run against a non-File Blob
. This matters, because there are other common sources of non-File Blobs, for example W3C streams and IndexedDB object storage.
It might be as simple as changing this one line and this similar check here. (I just started using the library today so unfortunately I'm not set up to test the changes myself, sorry.)