Disable browser extensions that block network requests
-
-
-
-
-
- If none of these steps work, please{' '}
-
- Contact support
-
- .
-
-
- Consider{' '}
-
- generating a HAR file
- {' '}
- from your session to help Support pinpoint the issue.
-
-
-
+
+
+ Session expired
+
+
+
Please sign in again to continue.
+
+
+
+ Try a different browser or disable extensions that block network requests. If
+ the problem persists:
+
+
+
+ Still stuck?{' '}
+
+ Contact support
+ {' '}
+ and include a{' '}
+
+ HAR file
+ {' '}
+ from your session to help us investigate.
+
+
+
+
+
+
+
+ Close
+ Sign in again
+
+
+
)
}
diff --git a/apps/studio/components/interfaces/Support/AttachmentUpload.tsx b/apps/studio/components/interfaces/Support/AttachmentUpload.tsx
index 36cd6ea6d41..99007e27d8b 100644
--- a/apps/studio/components/interfaces/Support/AttachmentUpload.tsx
+++ b/apps/studio/components/interfaces/Support/AttachmentUpload.tsx
@@ -1,5 +1,11 @@
+// End of third-party imports
+
+import { useGenerateAttachmentURLsMutation } from 'data/support/generate-attachment-urls-mutation'
+import { uuidv4 } from 'lib/helpers'
+import { useProfile } from 'lib/profile'
import { compact } from 'lodash'
-import { Plus, X } from 'lucide-react'
+import { File, FileCode, Plus, X } from 'lucide-react'
+import { InlineLink } from 'components/ui/InlineLink'
import {
useCallback,
useEffect,
@@ -10,12 +16,8 @@ import {
type RefObject,
} from 'react'
import { toast } from 'sonner'
-// End of third-party imports
+import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
-import { useGenerateAttachmentURLsMutation } from 'data/support/generate-attachment-urls-mutation'
-import { uuidv4 } from 'lib/helpers'
-import { useProfile } from 'lib/profile'
-import { cn } from 'ui'
import { createSupportStorageClient } from './support-storage-client'
const MAX_ATTACHMENTS = 5
@@ -26,7 +28,7 @@ const uploadAttachments = async ({ userId, files }: { userId: string; files: Fil
const filesToUpload = Array.from(files)
const uploadedFiles = await Promise.all(
filesToUpload.map(async (file) => {
- const suffix = file.type.split('/')[1]
+ const suffix = file.name.endsWith('.har') ? 'har' : file.type.split('/')[1]
const prefix = `${userId}/${uuidv4()}.${suffix}`
const options = { cacheControl: '3600' }
@@ -87,7 +89,13 @@ export function useAttachmentUpload() {
useEffect(() => {
if (!uploadedFiles) return
- const objectUrls = uploadedFiles.map((file) => URL.createObjectURL(file))
+ const objectUrls = uploadedFiles.map((file) => {
+ if (file.name.endsWith('.har')) {
+ return file.name
+ } else {
+ return URL.createObjectURL(file)
+ }
+ })
setUploadedDataUrls(objectUrls)
return () => {
@@ -158,10 +166,12 @@ export function AttachmentUploadDisplay({
return (
-
Attachments
+
Attachments
- Upload up to {MAX_ATTACHMENTS} screenshots that might be relevant to the issue that you're
- facing
+ Optionally upload up to {MAX_ATTACHMENTS} relevant images or{' '}
+
+ HAR files
+