diff --git a/docs/API.md b/docs/API.md index 5366f0f..6e7cf2a 100644 --- a/docs/API.md +++ b/docs/API.md @@ -155,7 +155,7 @@ ArchiveRecord { ``` CreateArchiveRecordParams { s3Url: string; - file: Pick; + file: Pick, 'contentType'> & Pick; item: Pick; parentFolder: Pick; } @@ -165,6 +165,9 @@ s3Url will generally be the value returned by `uploadFile`. Run `createArchiveRecord` to store information about uploaded files in the Permanent database. +file.contentType is deprecated. The field is still accepted for backwards compatibility, but it is not used. +The content type is determined by the file extension of the uploaded file. + ``` createArchiveRecord( clientConfiguration: ClientConfiguration, diff --git a/src/api/createRecordVo.ts b/src/api/createRecordVo.ts index 9b0358e..edabfb6 100644 --- a/src/api/createRecordVo.ts +++ b/src/api/createRecordVo.ts @@ -13,7 +13,7 @@ export interface CreateRecordVoRequest { displayName: string; parentFolderId: number; uploadFileName: string; - fileType: string; + fileType?: string; size: number; } diff --git a/src/sdk/createArchiveRecord.ts b/src/sdk/createArchiveRecord.ts index dd93c80..9c2380a 100644 --- a/src/sdk/createArchiveRecord.ts +++ b/src/sdk/createArchiveRecord.ts @@ -13,7 +13,7 @@ import type { export interface CreateArchiveRecordParams { s3Url: string; - file: Pick; + file: Pick, 'contentType'> & Pick; item: Pick; parentFolder: Pick; }