H5P NodeJS Library
    Preparing search index...

    Describes a reference to a file that is embedded inside the content.

    interface IFileReference {
        context: { jsonPath: string; params: any; semantics?: ISemanticsEntry };
        filePath: string;
        mimeType?: string;
        temporary: boolean;
    }
    Index

    Properties

    context: { jsonPath: string; params: any; semantics?: ISemanticsEntry }

    Information about where the file reference was found

    Type declaration

    • jsonPath: string

      The path of the object inside the params tree. You can use this path to later modify the params, if needed.

    • params: any

      The raw parameters of the object.

    • Optionalsemantics?: ISemanticsEntry

      The semantic structure of the object (as defined in semantics.json).

      Can be null or undefined if there is no semantic structure for the element (happens if the file can be found somewhere that is not described by the semantics)

    filePath: string

    The path of the file inside the H5P content directory as can be used to reference it in ContentManager (without any suffixes like #tmp).

    mimeType?: string

    The mime type specified in the params

    temporary: boolean

    If true, the file was marked as temporary (by the #tmp suffix). The suffix is not included in filePath