Skip to content

Commit

Permalink
Merge pull request #859 from veliovgroup/dev
Browse files Browse the repository at this point in the history
📔 Improve AWS S3 documentation
  • Loading branch information
dr-dimitru authored Nov 3, 2022
2 parents 7d4796e + 1690e90 commit df7a6c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/aws-s3-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ if (s3Conf && s3Conf.key && s3Conf.secret && s3Conf.bucket && s3Conf.region) {

// Intercept FilesCollection's remove method to remove file from AWS:S3
const _origRemove = UserFiles.remove;
UserFiles.remove = function (search) {
const cursor = this.collection.find(search);
UserFiles.remove = function (selector, callback) {
const cursor = this.collection.find(selector);
cursor.forEach((fileRef) => {
_.each(fileRef.versions, (vRef) => {
if (vRef && vRef.meta && vRef.meta.pipePath) {
Expand All @@ -248,8 +248,8 @@ if (s3Conf && s3Conf.key && s3Conf.secret && s3Conf.bucket && s3Conf.region) {
});
});

//remove original file from database
_origRemove.call(this, search);
// Remove original file from database
_origRemove.call(this, selector, callback);
};
} else {
throw new Meteor.Error(401, 'Missing Meteor file settings');
Expand Down

0 comments on commit df7a6c9

Please sign in to comment.