Files
spring-data-examples/mongodb/gridfs
Spring Operator ccae97890f #491 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 426 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 08:13:14 +01:00
..
2019-03-22 08:13:14 +01:00
2019-03-20 10:10:59 -05:00

Spring Data MongoDB - GridFS example

This project contains an example of GridFS specific features of Spring Data (MongoDB).

Support for storing a file

Using GridFsOperations to store a file.

InputStream is = ...
gridFsOperations.store(is, "myFile1.txt");

Support for query a file by name

Using GridFsOperations to query a GridFSDBFile by its filename.

GridFSDBFile gridFsFile = gridFsOperations.findOne(query(whereFilename().is("myFile1.txt")));

Support for storing a file with metadata

Using GridFsOperations to store a file with additional metadata..

InputStream is = ...
Customer customerMetaData = new Customer("Hardy", "Lang");
gridFsOperations.store(is, "myCustomerFile.txt", customerMetaData);

Support for query a file by metadata

Using GridFsOperations to query a GridFSDBFile by metadata.

GridFSDBFile gridFsFile = gridFsOperations.findOne(query(whereMetaData("firstName").is("Hardy")));