Skip to content
This repository was archived by the owner on Nov 24, 2021. It is now read-only.

Using Node Path module to get file extension #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SalehAlbuga
Copy link

Using Node's Path module to get file extension.
Replacing file.extension with path.extname(file.originalname). extname() handles all extension cases.
Because sometimes file.extension is undefined

replacing file.extension with path.extname(file.originalname). extname handles all extension cases
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant