Skip to content
File
updateFileBaseInfo

updateFileBaseInfo

To update the base information of a file.

Usage

await dataverseConnector.runOS({
  method: SYSTEM_CALL.updateFileBaseInfo,
  params: {
    indexFileId,
    fileInfo: {
      mirrorName,
    },
  },
});

Parameters

{
    indexFileId: string;
    fileInfo?: Omit<
        FileInfo,
        | "datatokenId"
        | "fileKey"
        | "encryptedSymmetricKey"
        | "decryptionConditions"
        | "decryptionConditionsType"
    >;
    syncImmediately?: boolean;
}
  • indexFileId: string - The indexfile id.
  • OPTIONAL - fileInfo: Omit<FileInfo, | "datatokenId" | "fileKey" | "encryptedSymmetricKey" | "decryptionConditions" | "decryptionConditionsType"> - detailed information of the file.
    interface FileInfo {
      contentId?: string;
      contentType?: IndexFileContentType;
      mirrorName?: string;
      note?: string;
      tags?: string[];
      originType?: OriginType;
      originURL?: string;
      originDate?: string;
      embedURL?: string;
      contentURL?: string;
      fileType?: FileType;
    }
  • OPTIONAL - syncImmediately: boolean - Whether to sync to data networks immediately or wait for the os scheduler.

Returns

{
  currentFile: MirrorFile;
  currentFolder: StructuredFolder;
  allFolders: StructuredFolders;
}

Example:

{
    currentFile: {
        indexFileId: "kjzl6kcym7w8y7lje2ywwqnm7x4ykmprpymq5n1m05dcbsc8431p6bs2y45j7z5",
        appVersion: "0.2.0",
        contentId: "QmRSDnHpj2xzasGfvgpLGCTcCyRdPxCnuARwjVhoxhuZKu",
        contentType: "CID",
        comment: {
            mirrorName: "aaa",
            note: "",
            tags: []
        },
        fileType: 0,
        createdAt: "2023-06-09T10:38:16.802Z",
        updatedAt: "2023-06-09T10:38:24.848Z"
    },
    allFolders: {
        ...
    },
    currentFolder: {
        ...
    }
}