@supabase/storage-js 2.95.2-canary.1 → 2.95.2
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 +3 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -101
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +71 -101
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -23
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +1 -1
- package/package.json +1 -1
- package/src/lib/common/fetch.ts +7 -1
- package/src/lib/types.ts +0 -11
- package/src/lib/version.ts +1 -1
- package/src/packages/StorageFileApi.ts +5 -31
package/dist/index.cjs
CHANGED
|
@@ -957,7 +957,6 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
957
957
|
* @category File Buckets
|
|
958
958
|
* @param path The full path and file name of the file to be downloaded. For example `folder/image.png`.
|
|
959
959
|
* @param options.transform Transform the asset before serving it to the client.
|
|
960
|
-
* @param parameters Additional fetch parameters like signal for cancellation. Supports standard fetch options including cache control.
|
|
961
960
|
* @returns BlobDownloadBuilder instance for downloading the file
|
|
962
961
|
*
|
|
963
962
|
* @example Download file
|
|
@@ -989,27 +988,8 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
989
988
|
* }
|
|
990
989
|
* })
|
|
991
990
|
* ```
|
|
992
|
-
*
|
|
993
|
-
* @example Download with cache control (useful in Edge Functions)
|
|
994
|
-
* ```js
|
|
995
|
-
* const { data, error } = await supabase
|
|
996
|
-
* .storage
|
|
997
|
-
* .from('avatars')
|
|
998
|
-
* .download('folder/avatar1.png', {}, { cache: 'no-store' })
|
|
999
|
-
* ```
|
|
1000
|
-
*
|
|
1001
|
-
* @example Download with abort signal
|
|
1002
|
-
* ```js
|
|
1003
|
-
* const controller = new AbortController()
|
|
1004
|
-
* setTimeout(() => controller.abort(), 5000)
|
|
1005
|
-
*
|
|
1006
|
-
* const { data, error } = await supabase
|
|
1007
|
-
* .storage
|
|
1008
|
-
* .from('avatars')
|
|
1009
|
-
* .download('folder/avatar1.png', {}, { signal: controller.signal })
|
|
1010
|
-
* ```
|
|
1011
991
|
*/
|
|
1012
|
-
download(path, options
|
|
992
|
+
download(path, options) {
|
|
1013
993
|
const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) !== "undefined" ? "render/image/authenticated" : "object";
|
|
1014
994
|
const transformationQuery = this.transformOptsToQueryString((options === null || options === void 0 ? void 0 : options.transform) || {});
|
|
1015
995
|
const queryString = transformationQuery ? `?${transformationQuery}` : "";
|
|
@@ -1017,7 +997,7 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
1017
997
|
const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString}`, {
|
|
1018
998
|
headers: this.headers,
|
|
1019
999
|
noResolveJson: true
|
|
1020
|
-
}
|
|
1000
|
+
});
|
|
1021
1001
|
return new BlobDownloadBuilder(downloadFn, this.shouldThrowOnError);
|
|
1022
1002
|
}
|
|
1023
1003
|
/**
|
|
@@ -1284,7 +1264,7 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
1284
1264
|
|
|
1285
1265
|
//#endregion
|
|
1286
1266
|
//#region src/lib/version.ts
|
|
1287
|
-
const version = "2.95.2
|
|
1267
|
+
const version = "2.95.2";
|
|
1288
1268
|
|
|
1289
1269
|
//#endregion
|
|
1290
1270
|
//#region src/lib/constants.ts
|