@stemy/backend 2.9.2 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1947,18 +1947,17 @@
1947
1947
  };
1948
1948
  Assets.prototype.upload = function (stream, fileType, metadata) {
1949
1949
  return __awaiter$q(this, void 0, void 0, function () {
1950
- var contentType, extension;
1950
+ var contentType;
1951
1951
  var _this = this;
1952
1952
  return __generator(this, function (_b) {
1953
1953
  contentType = fileType.mime.trim();
1954
- extension = (fileType.ext || "").trim();
1955
1954
  metadata = Object.assign({
1956
- extension: extension,
1957
1955
  downloadCount: 0,
1958
1956
  firstDownload: null,
1959
1957
  lastDownload: null
1960
1958
  }, metadata || {});
1961
1959
  metadata.filename = metadata.filename || new bson.ObjectId().toHexString();
1960
+ metadata.extension = (fileType.ext || "").trim();
1962
1961
  return [2 /*return*/, new Promise((function (resolve, reject) {
1963
1962
  var uploaderStream = _this.bucket.openUploadStream(metadata.filename);
1964
1963
  stream.pipe(uploaderStream)