feat: Add useUpload hook for handling file uploads to R2 storage via presigned URLs.

This commit is contained in:
dyzulk
2026-01-16 18:12:46 +07:00
parent cf3ea5856c
commit 1f4afaeff3

View File

@@ -9,7 +9,7 @@ export const useUpload = () => {
const [uploading, setUploading] = useState(false); const [uploading, setUploading] = useState(false);
const [error, setError] = useState<string | null>(null); const [error, setError] = useState<string | null>(null);
const uploadFile = async (file: File, folder: string = 'uploads'): Promise<UploadResult | null> => { const uploadFile = async (file: File, folder: string = 'imagine/misc'): Promise<UploadResult | null> => {
setUploading(true); setUploading(true);
setError(null); setError(null);