You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by Apache Wiki <wi...@apache.org> on 2016/03/21 20:30:24 UTC

[Tika Wiki] Update of "TikaJAXRS" by sergey_beryozkin

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tika Wiki" for change notification.

The "TikaJAXRS" page has been changed by sergey_beryozkin:
https://wiki.apache.org/tika/TikaJAXRS?action=diff&rev1=40&rev2=41

  With {{{--rm}}} option it will be deleted as soon as container stopped. Dockerfile can be found at [[https://github.com/LogicalSpark/docker-tikaserver|Github]].
  
  = Services =
- All services that take files use HTTP "PUT" requests. Original file must be sent in request body without any additional encoding (do not use multipart/form-data or other containers).
+ All services that take files use HTTP "PUT" requests. When "PUT" is used, the original file must be sent in request body without any additional encoding (do not use multipart/form-data or other containers).
+ 
+ Additionally, Tika Resource Service accepts POST multipart/form-data requests, where the original file is sent as a single attachment. 
  
  Information services (eg defined mimetypes, defined parsers etc) work with HTML "GET" requests.
  
@@ -154, +156 @@

  $ curl -T price.xls http://localhost:9998/tika --header "Accept: text/html"
  $ curl -T price.xls http://localhost:9998/tika --header "Accept: text/plain"
  }}}
+ 
+ === Multipart Support ===
+ 
+ Tika Resource also accepts the files as multipart/form-data attachments with POST.
+ Posting files as multipart attachments may be beneficial in cases when the files are too big for them to be PUT directly in the request body.
+ Note that Tika JAX-RS server makes the best effort at storing some of the multipart content to the disk while still supporting the streaming:
+ 
+ {{{
+ curl -F upload=@price.xls URL http://localhost:9998/tika/form
+ }}}
+ 
+ Note that the address has an extra "/form" path segment.
+ 
+ 
  == Detector Resource ==
  {{{
  /detect/stream
@@ -215, +231 @@

  curl -X PUT --data "comme çi comme ça" http://localhost:9998/language/string
  fr
  }}}
+ 
  == Translate Resource ==
  {{{
  /translate/all/translator/src/dest