@supabase/storage-js 2.107.0-canary.1 → 2.107.0-canary.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.
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +15 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +1 -1
- package/package.json +1 -1
- package/src/lib/version.ts +1 -1
- package/src/packages/StorageFileApi.ts +15 -0
package/dist/index.cjs
CHANGED
|
@@ -679,6 +679,21 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
679
679
|
* })
|
|
680
680
|
* ```
|
|
681
681
|
*
|
|
682
|
+
* @example Handling errors
|
|
683
|
+
* ```js
|
|
684
|
+
* const { data, error } = await supabase
|
|
685
|
+
* .storage
|
|
686
|
+
* .from('avatars')
|
|
687
|
+
* .upload('public/avatar1.png', avatarFile)
|
|
688
|
+
*
|
|
689
|
+
* if (error) {
|
|
690
|
+
* // Log the full error so fields like `statusCode` and `error` (the
|
|
691
|
+
* // Storage error name, e.g. "Duplicate") aren't hidden behind `error.message`.
|
|
692
|
+
* console.error(error)
|
|
693
|
+
* return
|
|
694
|
+
* }
|
|
695
|
+
* ```
|
|
696
|
+
*
|
|
682
697
|
* @remarks
|
|
683
698
|
* - RLS policy permissions required:
|
|
684
699
|
* - `buckets` table permissions: none
|
|
@@ -1529,7 +1544,7 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
1529
1544
|
|
|
1530
1545
|
//#endregion
|
|
1531
1546
|
//#region src/lib/version.ts
|
|
1532
|
-
const version = "2.107.0-canary.
|
|
1547
|
+
const version = "2.107.0-canary.3";
|
|
1533
1548
|
|
|
1534
1549
|
//#endregion
|
|
1535
1550
|
//#region src/lib/constants.ts
|