Event.tartget.files [0] parameter in picture upload

let file = event.target.files [0];
looks at the property values of this event.tartget.files [0] in the console, as shown in figure

clipboard.png
then I want to know what type this attribute value is. The first habitual thinking is the object type, and then we"ll see how it looks like a function type. Here"s the point. I use

.
console.log (Object.prototype.toString.call (file) ="[object Object]"); / / false
console.log (Object.prototype.toString.call (file) ="[object Function]"); / / false

console.log (typeof file); / / object
curious, what kind of goods is this? Partners with research share their experiences

Apr.09,2021

File

reason WEB API has nothing to do with js objects, or WEB API does not belong to js .


is an object MDN Document


print the console.log directly (Object.prototype.toString.call (file)) will know


console.log (Object.prototype.toString.call (file) ='[object File]') = > true

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb09be-480ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb09be-480ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?