'Property 'name' does not exist on type 'Blob'
I have a blob (naming it file) and I am trying to store its name value by doing something like this
properties.name = file.name;
but it's keep complaining about
Property 'name' does not exist on type 'Blob'.
The quick fix they suggested adds name to blob in TypeScript node_modules folder which I don't want to.
What are the suggestion/options I should do to fix this error? Sorry, I am new to TS and I am not sure what to search.
This is my image blob console.log. It could be possible (from comment) that library I am using might have added blob
lastModified: 1596803874299
lastModifiedDate: Fri Aug 07 2020 18:07:54 GMT+0530 (India Standard Time) {}
name: "photo of Elizabeth Tower, London-gcffb6skhv.jpg"
size: 408146
type: "image/jpeg"
webkitRelativePath: ""
Solution 1:[1]
I know that this is a 1 year and 7 months old question, but just ran into this issue myself.
The solution here is to use the type File that extends Blob.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Flibben |
