[
https://issues.apache.org/jira/browse/TIKA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683358#action_12683358
]
Uwe Schindler commented on TIKA-200:
------------------------------------
Yes, you can get all headers from the HTTP respnse. Normally you would create a
URL instance, here you can do it:
} else if (transferable.isDataFlavorSupported(urlListFlavor)) {
tika.importStream(new URL((String)
transferable.getTransferData(urlListFlavor)).openStream());
Just convert to:
URLConnection url=new URL((String)
transferable.getTransferData(urlListFlavor)).openConnection();
urlconn.connect();
String contentType=urlconn.getContentType();
// set content type in metadata (see below)
tika.importStream(urlconn.getInputStream());
// maybe close stream, not sure if needed
Note: The content type may also contain the charset, if TIKA cannot handle this
combined thing, you must parse the String before
> Allow URL drag and drop in the Tika GUI
> ---------------------------------------
>
> Key: TIKA-200
> URL: https://issues.apache.org/jira/browse/TIKA-200
> Project: Tika
> Issue Type: New Feature
> Components: gui
> Reporter: Jukka Zitting
> Priority: Minor
> Fix For: 0.4
>
> Attachments: TIKA-200.diff
>
>
> It would be nice if I could drag a URL from my browser to the Tika GUI window
> to have the linked document downloaded and parsed by Tika.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.