Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

File type node js

const FileType = require('file-type');

(async () => {
	console.log(await FileType.fromFile('Unicorn.png'));
	//=> {ext: 'png', mime: 'image/png'}
})();
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #File #type #node #js
ADD COMMENT
Topic
Name
3+5 =