Knora is designed to support storing different types of files in Sipi, and support for a few different file types was implemented in Knora API v1. For API v2, the interaction between Knora and Sipi was redesigned to make it simpler and more robust, to clearly separate Knora’s and Sipi’s responsibilities, and to facilitate deployment in Docker:
- The content of the file is handled only by Sipi, and Knora sees only the file metadata, which Sipi provides.
- When uploading a file, the client submits it directly to Sipi, which then does validation or image conversion. Any errors at this stage are handled in Sipi rather than in Knora. Only after Sipi accepts the file can the client use the file’s ID in an update request to Knora.
- Knora and Sipi don’t need to share a filesystem; this makes deployment in Docker easier.
This design was implemented in Knora PR 1011, but only for image files. Support for other file types has begun in Knora PR 1206, but is waiting for some additional implementation in Sipi (see Sipi issue 283). As noted in Knora issue 1202, our friends in Lausanne especially need support for PDF and text files.
Once that’s done, Knora API v1 can be changed to handle image uploads in the same way; work in progress is in Knora PR 1233.
We would like to provide additional features for PDF files: