The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: cache busting timestamp query param
Alaister Young77ae49158bfd
diff --git a/studio/localStores/storageExplorer/StorageExplorerStore.js b/studio/localStores/storageExplorer/StorageExplorerStore.jsindex 9824cb92293..148f6f1d9bf 100644--- a/studio/localStores/storageExplorer/StorageExplorerStore.js+++ b/studio/localStores/storageExplorer/StorageExplorerStore.js@@ -286,7 +286,7 @@ class StorageExplorerStore {if (isNull(formattedName)) {return}- /**+ /*** todo: move this to a util file, as renameFolder() uses same logic*/if (formattedName.includes('/') || formattedName.includes('\\')) {@@ -376,13 +376,15 @@ class StorageExplorerStore {} else {// Need to generate signed URL, and might as well save it to cache as wellconst signedUrl = await this.fetchFilePreview(file.name)- const formattedUrl = `${signedUrl}?t=${new Date().toISOString()}`- copyToClipboard(formattedUrl, () => {+ let formattedUrl = new URL(signedUrl)+ formattedUrl.searchParams.set('t', new Date().toISOString())++ copyToClipboard(formattedUrl.toString(), () => {toast(`Copied URL for ${file.name} to clipboard.`)})const fileCache = {id: file.id,- url: formattedUrl,+ url: formattedUrl.toString(),expiresIn: DEFAULT_EXPIRY,fetchedAt: Date.now(),}@@ -1093,10 +1095,10 @@ class StorageExplorerStore {/*** Catch any folder names that contain slash or backslash- *- * this is because slashes are used to denote+ *+ * this is because slashes are used to denote* children/parent relationships in bucket- *+ ** todo: move this to a util file, as createFolder() uses same logic*/if (newName.includes('/') || newName.includes('\\')) {