diff --git a/src/gridfs/download.ts b/src/gridfs/download.ts index 6736b968f15..dc2cbfd90ff 100644 --- a/src/gridfs/download.ts +++ b/src/gridfs/download.ts @@ -44,10 +44,12 @@ export interface GridFSFile { length: number; chunkSize: number; filename: string; - contentType?: string; - aliases?: string[]; metadata?: Document; uploadDate: Date; + /** @deprecated Will be removed in the next major version. */ + contentType?: string; + /** @deprecated Will be removed in the next major version. */ + aliases?: string[]; } /** @internal */ diff --git a/src/gridfs/upload.ts b/src/gridfs/upload.ts index 9feb8141581..2f3ad9c177f 100644 --- a/src/gridfs/upload.ts +++ b/src/gridfs/upload.ts @@ -26,9 +26,15 @@ export interface GridFSBucketWriteStreamOptions extends WriteConcernOptions { id?: ObjectId; /** Object to store in the file document's `metadata` field */ metadata?: Document; - /** String to store in the file document's `contentType` field */ + /** + * String to store in the file document's `contentType` field. + * @deprecated Will be removed in the next major version. Add a contentType field to the metadata document instead. + */ contentType?: string; - /** Array of strings to store in the file document's `aliases` field */ + /** + * Array of strings to store in the file document's `aliases` field. + * @deprecated Will be removed in the next major version. Add an aliases field to the metadata document instead. + */ aliases?: string[]; }