@quatrain/storage-supabase 1.1.12 → 1.1.13
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.
|
@@ -172,14 +172,15 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
172
172
|
return meta.path;
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
getUploadUrl(file, _expiresIn =
|
|
175
|
+
getUploadUrl(file, _expiresIn = 7200) {
|
|
176
176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
177
|
const { data, error } = yield this._client
|
|
178
178
|
.from(file.bucket)
|
|
179
|
-
.createSignedUploadUrl(file.ref);
|
|
179
|
+
.createSignedUploadUrl(file.ref, { upsert: true });
|
|
180
180
|
if (error !== null) {
|
|
181
181
|
throw new Error(`Unable to get signed upload url: ${error}`);
|
|
182
182
|
}
|
|
183
|
+
storage_1.Storage.info(`Upload URL for ${file.ref} in bucket ${file.bucket} is ${data === null || data === void 0 ? void 0 : data.signedUrl}`);
|
|
183
184
|
return {
|
|
184
185
|
url: data === null || data === void 0 ? void 0 : data.signedUrl,
|
|
185
186
|
method: 'PUT',
|