bruce-models 4.8.3 → 4.8.4

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.
@@ -534,15 +534,18 @@
534
534
  if (!params) {
535
535
  params = {};
536
536
  }
537
- params.headers = params.headers || {};
538
537
  params.headers = Object.assign({}, params.headers);
539
538
  if (this.ssidHeader && this.ssid) {
540
539
  params.headers[this.ssidHeader] = this.ssid;
541
540
  }
542
- const formData = new FormData();
541
+ const formData = params.formData instanceof FormData ? params.formData : new FormData();
542
+ if (formData.has("file")) {
543
+ formData.delete("file");
544
+ }
543
545
  formData.append("file", blob);
544
- if (params === null || params === void 0 ? void 0 : params.formData) {
545
- for (const key in params.formData) {
546
+ // If the provided form data was a plain object, append its properties to the form data.
547
+ if (params.formData && !(params.formData instanceof FormData)) {
548
+ for (let key in params.formData) {
546
549
  formData.append(key, params.formData[key]);
547
550
  }
548
551
  }
@@ -14003,7 +14006,7 @@
14003
14006
  })(exports.DataSource || (exports.DataSource = {}));
14004
14007
 
14005
14008
  // This is updated with the package.json version on build.
14006
- const VERSION = "4.8.3";
14009
+ const VERSION = "4.8.4";
14007
14010
 
14008
14011
  exports.VERSION = VERSION;
14009
14012
  exports.AbstractApi = AbstractApi;