logo
Search
showing results for - "uploadgetfiletypefileextension"
Isabell
14 Jul 2019
1function getFileNameWithExt(event) {
2
3  if (!event || !event.target || !event.target.files || event.target.files.length === 0) {
4    return;
5  }
6
7  const name = event.target.files[0].name;
8  const lastDot = name.lastIndexOf('.');
9
10  const fileName = name.substring(0, lastDot);
11  const ext = name.substring(lastDot + 1);
12
13  outputfile.value = fileName;
14  extension.value = ext;
15  
16}
source
similar questions
chrome extension how to save data to an alternative fileget file extension file upload control in javascriptfile upload validation
queries leading to this page
js get extension from file typejs find file extentionjavascript get file extention and name of file urljs get file extensionget file extension from string jshow to check the file extension in javascriptfile get extension javascriptget extension of file javascriptjavascript get file extension from stringjs get file extension from stringjavascript get extension of filenamecheck file extension javascriptjavascript find file extensionget file extension from url javscriptjavascript get file extensioncheck the file extension in javascriptjavascript get file extnsionhow to get extension of file in jshow to get file extension in javascripthow to get file extention from name in javascriptget file extension javascriptuploadgetfiletypefileextension
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue