Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apache Tika with an af:InputFile

Paul (MITsa)Oct 13 2016 — edited Oct 13 2016

Jdeveloper 11.1.1.7.0

Hi

We are using an af:InputFile object to upload files to our database. This works correctly.

We have now been tasked to verify that the file extension corresponds to file contents.

One "test" we have to pass is the renaming of files to another file type.

ex. A command file name testcmd.pdf or an exe file name testexe.pdf etc.

After various test using Files.probeContentType, MimetypesFileTypeMap etc. we came across Apache Tika

The most reliable method out of all options is the Tiak detect method which uses a mix of the file extension and the

file contents however it needs the complete file path.which af:InputFile does not have.

Does anybody have an experience using apache Tika deect method and anaf:InputFile ?

Regards

Paul

This post has been answered by Cvele_new_account on Oct 13 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2016
Added on Oct 13 2016
3 comments
307 views