Link to home
Start Free TrialLog in
Avatar of huzefaq
huzefaq

asked on

how tp get just the extension of a file

Hi I have this code

file_name = form_file_input.getName();
file_size = (int) form_file_input.getSize();
file_type = form_file_input.getContentType();

Now form_file_input.getContentType(); gets this value application/vnd.ms-excel for an excel file
but what I need is to get .xls so that I can add this .xls to the filename when I am saving the file.

Any help will be greatly appreciated



ASKER CERTIFIED SOLUTION
Avatar of enachemc
enachemc
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial