jQuery find file extension (from string) -
I was wondering if it is possible to find the file extensions based on the returned string for jQuery?
A file name (string) will be passed to a function (openfile) and I wanted to do that function for different things, through which the file has been passed, it Can be image files or PDF files.
function open file (file) {// if .jpg / .gif / .png do something / if Zip / .rar do something else // if .pdf do something else);
I'm looking for something that will expand the file but I can not find anything.
Comments
Post a Comment