Skip to content

Commit d2225da

Browse files
feat(NODE-5590): deprecate GridFS fields (#3905)
1 parent f495abb commit d2225da

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/gridfs/download.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ export interface GridFSFile {
4444
length: number;
4545
chunkSize: number;
4646
filename: string;
47-
contentType?: string;
48-
aliases?: string[];
4947
metadata?: Document;
5048
uploadDate: Date;
49+
/** @deprecated Will be removed in the next major version. */
50+
contentType?: string;
51+
/** @deprecated Will be removed in the next major version. */
52+
aliases?: string[];
5153
}
5254

5355
/** @internal */

src/gridfs/upload.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ export interface GridFSBucketWriteStreamOptions extends WriteConcernOptions {
2626
id?: ObjectId;
2727
/** Object to store in the file document's `metadata` field */
2828
metadata?: Document;
29-
/** String to store in the file document's `contentType` field */
29+
/**
30+
* String to store in the file document's `contentType` field.
31+
* @deprecated Will be removed in the next major version. Add a contentType field to the metadata document instead.
32+
*/
3033
contentType?: string;
31-
/** Array of strings to store in the file document's `aliases` field */
34+
/**
35+
* Array of strings to store in the file document's `aliases` field.
36+
* @deprecated Will be removed in the next major version. Add an aliases field to the metadata document instead.
37+
*/
3238
aliases?: string[];
3339
}
3440

0 commit comments

Comments
 (0)