Optional
options: { fileSanitizers?: IFileSanitizer[]; malwareScanners?: IFileMalwareScanner[] }Optional
fileSanitizers?: IFileSanitizer[]A list of file sanitizers that are executed for content files in order of the array when a file or package is uploaded.
Optional
malwareScanners?: IFileMalwareScanner[]Saves content in the persistence system. Also copies over files from temporary storage or from other content if the content was pasted from there.
Note: This method has side-effects on the parameters argument, meaning it mutates the object!
the contentId (can be undefined if previously unsaved)
the parameters of the content (= content.json)
= content of h5p.json
the library name
the user who wants to save the file
Adds content from a H5P package (in a temporary directory) to the system.
The absolute path containing the package (the directory containing h5p.json)
The user who is adding the package.
Optional
contentId: string(optional) The content id to use for the package
The id of the content that was created (the one passed to the method or a new id if there was none).
Scans through the parameters of the content and copies all referenced files into temporary storage.
the metadata and parameters of the content
Contains logic to store content in permanent storage. Copies files from temporary storage and deletes unused files.