Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Revert "Revert changes for SupportForm for Sb-2.0"

Joshen Limbc9db520d1b4
diff --git a/studio/components/interfaces/Support/SupportForm.utils.ts b/studio/components/interfaces/Support/SupportForm.utils.ts
index 252d106155e..6202a9855f5 100644
--- a/studio/components/interfaces/Support/SupportForm.utils.ts
+++ b/studio/components/interfaces/Support/SupportForm.utils.ts
@@ -8,10 +8,10 @@ const supportSupabaseClient = createClient(SUPPORT_API_URL, SUPPORT_API_KEY, {
auth: {
persistSession: false,
autoRefreshToken: false,
+ // @ts-ignore
multiTab: false,
detectSessionInUrl: false,
localStorage: {
- // @ts-ignore
getItem: (key: string) => undefined,
setItem: (key: string, value: string) => {},
removeItem: (key: string) => {},
@@ -45,10 +45,7 @@ export const uploadAttachments = async (ref: string, files: File[]) => {
return data
})
)
-
- // [Joshen] To revert once we go back to sb 2.0
- // const keys = compact(uploadedFiles).map((file) => file.path)
- const keys = compact(uploadedFiles).map((file) => file.Key.split('/').slice(1).join('/'))
+ const keys = compact(uploadedFiles).map((file) => file.path)
const { data, error } = await supportSupabaseClient.storage
.from('support-attachments')
@@ -56,8 +53,7 @@ export const uploadAttachments = async (ref: string, files: File[]) => {
if (error) {
console.error('Failed to retrieve URLs for attachments', error)
}
- // [Joshen] Change to signedUrl after going back to sb 2.0
- return data ? data.map((file) => file.signedURL) : []
+ return data ? data.map((file) => file.signedUrl) : []
}
export const formatMessage = (message: string, attachments: string[]) => {