Additional Services

File Manager

Updated: October 16, 2020

The File Manager is used for creating documents from simple binaries.

From a user perspective, the Nuxeo Platform offers many ways to capture a binary so as to make it a document with a binary property. It can be done from the browser's drag and drop, from WebDAV, from CMIS, from Nuxeo Drive,  ...

The file manager service is a traditional Nuxeo Platform service that offers some methods that help standardize what happens when a file is captured in the Platform, in regard to:

  • what document type should be created
  • what is the property mapping logic
  • what is the versioning policy
  • how should the binary be processed (exploding a zip, doing some pre-persistence conversions)

Customising and Using the File Manager Service

  • The File Manager service has a plugin architecture, so that it is possible to contribute different policies depending on the mime-type of the file and the context. The default Nuxeo Platform use cases of the File Manager can be customised reading the documentation of the file manager service extension point. There are also means of controlling the versioning policy of documents updated via this channel. Finally, there is a helper for implementing binary unicity checks.
  • The File Manager can be called and used in your custom Java code with the standard service call pattern: 
... fileManager = Framework.getService(FileManager.class);
DocumentModel createdDoc = fileManager.createDocumentFromBlob(coreSession, blob, path, true, fileName);
  • And you can also use the dedicated automation operation, which provides a way to create in one REST call an document from a binary, or to create easily a document from a blob in an automation chain.

See also the tutorial on how to change the default document type used when importing files in the Nuxeo Platform.


We'd love to hear your thoughts!

All fields required