Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/gridfs/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
10 changes: 8 additions & 2 deletions src/gridfs/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
}

Expand Down