Messages
Topics
Lists
Groups
Marketplace
Jobs
Bongani Ngema
2 years ago
I had the need to find the extension of a file.
I had the name of the file, in my case an image, and wanted to get the extension (.jpg, .png…).
#node #nodejs
How to upload files to S3 from Node.js - I believe you can do the following to get the extension of a file name. var path = require('path') path.extname('index.html') // returns '.html'. I had the need to find the extension of a file.