Skip to content

Commit

Permalink
feat(NODE-5590): deprecate GridFS fields (#3905)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenakhineika authored Oct 31, 2023
1 parent f495abb commit d2225da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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

0 comments on commit d2225da

Please sign in to comment.