@quatrain/storage-supabase 1.2.5 → 1.2.6
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.
|
@@ -117,7 +117,7 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
117
117
|
const { error } = yield this._client
|
|
118
118
|
.from(file.bucket)
|
|
119
119
|
.upload(file.ref, new Blob([node_fs_1.default.readFileSync(stream)]), {
|
|
120
|
-
upsert:
|
|
120
|
+
upsert: storage_1.Storage.defaultUpsert,
|
|
121
121
|
contentType: file.contentType,
|
|
122
122
|
});
|
|
123
123
|
if (error !== null) {
|
|
@@ -134,7 +134,7 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
134
134
|
.from(file.bucket)
|
|
135
135
|
.upload(file.ref, content, {
|
|
136
136
|
// cacheControl: '3600',
|
|
137
|
-
upsert:
|
|
137
|
+
upsert: storage_1.Storage.defaultUpsert,
|
|
138
138
|
contentType: file.contentType,
|
|
139
139
|
});
|
|
140
140
|
if (error !== null) {
|
|
@@ -306,7 +306,7 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
306
306
|
return __awaiter(this, arguments, void 0, function* (file, _expiresIn = 7200) {
|
|
307
307
|
const { data, error } = yield this._client
|
|
308
308
|
.from(file.bucket)
|
|
309
|
-
.createSignedUploadUrl(file.ref, { upsert:
|
|
309
|
+
.createSignedUploadUrl(file.ref, { upsert: storage_1.Storage.defaultUpsert });
|
|
310
310
|
if (error !== null) {
|
|
311
311
|
throw new Error(`Unable to get signed upload url: ${error}`);
|
|
312
312
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/storage-supabase",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Storage adapter for Supabase Storage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"typescript": "^5.1.5"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@quatrain/core": "^1.2.
|
|
35
|
-
"@quatrain/storage": "^1.2.
|
|
34
|
+
"@quatrain/core": "^1.2.16",
|
|
35
|
+
"@quatrain/storage": "^1.2.12",
|
|
36
36
|
"@supabase/storage-js": "^2.7.2",
|
|
37
|
-
"@supabase/supabase-js": "^2.
|
|
37
|
+
"@supabase/supabase-js": "^2.108.2"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"test-ci": "jest --runInBand",
|
|
@@ -120,7 +120,7 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
|
|
|
120
120
|
const { error } = await this._client
|
|
121
121
|
.from(file.bucket)
|
|
122
122
|
.upload(file.ref, new Blob([fs.readFileSync(stream)]), {
|
|
123
|
-
upsert:
|
|
123
|
+
upsert: Storage.defaultUpsert,
|
|
124
124
|
contentType: file.contentType,
|
|
125
125
|
})
|
|
126
126
|
if (error !== null) {
|
|
@@ -136,7 +136,7 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
|
|
|
136
136
|
.from(file.bucket)
|
|
137
137
|
.upload(file.ref, content, {
|
|
138
138
|
// cacheControl: '3600',
|
|
139
|
-
upsert:
|
|
139
|
+
upsert: Storage.defaultUpsert,
|
|
140
140
|
contentType: file.contentType,
|
|
141
141
|
})
|
|
142
142
|
if (error !== null) {
|
|
@@ -330,7 +330,7 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
|
|
|
330
330
|
): Promise<FileResponseLinkType> {
|
|
331
331
|
const { data, error } = await this._client
|
|
332
332
|
.from(file.bucket)
|
|
333
|
-
.createSignedUploadUrl(file.ref, { upsert:
|
|
333
|
+
.createSignedUploadUrl(file.ref, { upsert: Storage.defaultUpsert })
|
|
334
334
|
|
|
335
335
|
if (error !== null) {
|
|
336
336
|
throw new Error(`Unable to get signed upload url: ${error}`)
|