Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns an Reader that lists all the filenames , their ID, their upload time, and their size IDs in a tab separated stream.

Code Block
// from("direct:listAll").to("gridfs?database=tickets&operation=listAll");
Reader result = template.requestBodyAndHeader("direct:listAll", "irrelevantBody");

filename1.txt	1252314321	2016
filename2.txt	2897651254  2016/01/01:01.

 

findOne

Finds a file in the GridFS system and sets the body to an InputStream of the content.   Also provides the metadata has headers.  It uses Exchange.FILE_NAME from the incoming headers to determine the file to find.

...