Closed romanhrynevych closed 1 month ago
Because fileTypeFromFile
is used to access files on you local file system, which is only possible via Node.js file sytem API.
If you want to read a File (a File you uploaded in a browser environment), you can use fileTypeFromBlob(blob)
.
This could be better documented in the README, please keep this issue open until that is clearly captured.
Why I can't use this function inside my front-end app to define what mime type is file?