Tika could not delete temporary files

In our application we are processing files using Apache Tika. But there are some files (e.g. *.mov, *.mp4) which Tika cannot process and leaves the corresponding *.tmp file in the user's Temp folder. After some research I found that it is a known bug: https://issues.apache.org/jira/browse/TIKA-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel In the last comment a user talks about a workaround but it does not work for me: final Tika tika = new Tika(); final TikaInputStream fileStream = TikaInputStream.get(/*some InputStream*/); try { final String extractedString = tika.parseToString(fileStream); //do something with the string } finally { CloseUtils.close(fileStream); } Using the code above still leaves temp files in the Temp folder. What could be a solution to this?
If you're on Linux/Unix, you could let a cronjob clean up the temporary files.

以上就是Tika could not delete temporary files的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准