fix: signed URLs for private bucket, 10MB server-side limit, safe auth destructuring

This commit is contained in:
2026-07-10 12:00:52 +08:00
parent 8a9758c8a6
commit a40a0f7c59
3 changed files with 37 additions and 17 deletions
+1 -3
View File
@@ -1,7 +1,6 @@
'use client'
import { useRef, useState } from 'react'
import type { EvidenceStage } from '@/lib/supabase/storage'
const ACCEPTED = [
'image/jpeg', 'image/png', 'image/heic', 'image/webp',
@@ -17,12 +16,11 @@ const MAX_SIZE = {
}
interface Props {
stage: EvidenceStage
onFilesChange: (files: File[]) => void
disabled?: boolean
}
export function FileUpload({ stage, onFilesChange, disabled = false }: Props) {
export function FileUpload({ onFilesChange, disabled = false }: Props) {
const inputRef = useRef<HTMLInputElement>(null)
const [files, setFiles] = useState<File[]>([])
const [errors, setErrors] = useState<string[]>([])