Skip to content

Commit

Permalink
feat: insertAsync for Client
Browse files Browse the repository at this point in the history
- returns `uploadInstance`, same as `.insert` method
  • Loading branch information
dr-dimitru committed Feb 4, 2025
1 parent 90a4a3f commit 8854ded
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class FilesCollection extends FilesCollectionCore {
*/
insert(config, autoStart = true) {
if (this.disableUpload) {
Meteor._debug('[FilesCollection] [insert()] Upload is disabled with [disableUpload]!');
this._debug('[FilesCollection] [insert()] Upload is disabled with [disableUpload]!');
return {};
}
const uploadInstance = new UploadInstance(config, this);
Expand All @@ -264,6 +264,16 @@ class FilesCollection extends FilesCollectionCore {
return uploadInstance;
}

/**
* @locus Client
* @memberOf FilesCollection
* @name insertAsync
* @see FilesCollection#insert for usage
*/
async insertAsync(config, autoStart = true) {
return this.insert(config, autoStart);
}

/**
* @locus Client
* @memberOf FilesCollection
Expand Down

0 comments on commit 8854ded

Please sign in to comment.