You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Nilesh Naik <ni...@gmail.com> on 2011/03/26 09:45:58 UTC

[fileupload] Identify the type of document uploaded

Hello,

Is there a way to identify/confirm that the uploaded document is of the type
.doc or pdf? Becase based upon the type, I either need to use POI or Apache
PDFBox for further processing.

Thank you!

Re: [fileupload] Identify the type of document uploaded

Posted by Anand Shankar <an...@gmail.com>.
Ya
You can use String Tokenizer to get the extension of the file  from file
name.





On Sat, Mar 26, 2011 at 2:15 PM, Nilesh Naik <ni...@gmail.com>wrote:

> Hello,
>
> Is there a way to identify/confirm that the uploaded document is of the
> type
> .doc or pdf? Becase based upon the type, I either need to use POI or Apache
> PDFBox for further processing.
>
> Thank you!
>



-- 
Thanks
Anand Shankar