change upload limit from 25MB to 1GB
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
|||||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxUploadSize = 25 << 20 // 25 MB per file
|
const maxUploadSize = 1 << 30 // 1 GB per file
|
||||||
|
|
||||||
var allowedExtensions = map[string]bool{
|
var allowedExtensions = map[string]bool{
|
||||||
".jpg": true, ".jpeg": true, ".png": true, ".gif": true, ".webp": true,
|
".jpg": true, ".jpeg": true, ".png": true, ".gif": true, ".webp": true,
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ export const MessageInput = forwardRef<HTMLTextAreaElement, MessageInputProps>(f
|
|||||||
const validateFile = useCallback((file: File): string | null => {
|
const validateFile = useCallback((file: File): string | null => {
|
||||||
const ext = file.name.slice(file.name.lastIndexOf(".")).toLowerCase();
|
const ext = file.name.slice(file.name.lastIndexOf(".")).toLowerCase();
|
||||||
if (!SAFE_EXTS.has(ext)) return `File type "${ext}" not allowed.`;
|
if (!SAFE_EXTS.has(ext)) return `File type "${ext}" not allowed.`;
|
||||||
if (file.size > 25 * 1024 * 1024) return "File too large (max 25 MB).";
|
if (file.size > 1024 * 1024 * 1024) return "File too large (max 1 GB).";
|
||||||
return null;
|
return null;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user