@supabase/storage-js 3.0.0-next.10 → 3.0.0-next.12

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.
package/dist/index.cjs CHANGED
@@ -726,11 +726,12 @@ var StorageFileApi = class extends BaseApiClient {
726
726
  headers["cache-control"] = `max-age=${options.cacheControl}`;
727
727
  headers["content-type"] = options.contentType;
728
728
  if (metadata) headers["x-metadata"] = _this3.toBase64(_this3.encodeMetadata(metadata));
729
+ if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
729
730
  }
730
731
  if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
731
732
  return {
732
733
  path: cleanPath,
733
- fullPath: (await put(_this3.fetch, url.toString(), body, { headers })).Key
734
+ fullPath: (await put(_this3.fetch, url.toString(), body, _objectSpread2({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}))).Key
734
735
  };
735
736
  });
736
737
  }
@@ -1486,7 +1487,7 @@ var StorageFileApi = class extends BaseApiClient {
1486
1487
 
1487
1488
  //#endregion
1488
1489
  //#region src/lib/version.ts
1489
- const version = "3.0.0-next.10";
1490
+ const version = "3.0.0-next.12";
1490
1491
 
1491
1492
  //#endregion
1492
1493
  //#region src/lib/constants.ts