diff --git a/app/share/client.tsx b/app/share/client.tsx index caf6955..8e5eaaa 100644 --- a/app/share/client.tsx +++ b/app/share/client.tsx @@ -3,7 +3,7 @@ import Image from "next/image"; import { useRouter } from "next/navigation"; import { useEffect, useMemo, useRef, useState } from "react"; -import { FileText, ImagePlus, Upload, X } from "lucide-react"; +import { FileUp, ImagePlus, Upload, X } from "lucide-react"; import { toast } from "sonner"; import { createShareAction } from "@/app/actions/share"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; @@ -59,12 +59,8 @@ export function ShareUploadClient() { async function loadTextFile(file: File) { setError(null); - if (!file.name.toLowerCase().endsWith(".txt")) { - setError("เลือกไฟล์ .txt เท่านั้น"); - return; - } if (file.size > MAX_SHARE_TEXT_BYTES) { - setError("ไฟล์ข้อความต้องมีขนาดไม่เกิน 5 MiB"); + setError("ไฟล์ต้องมีขนาดไม่เกิน 5 MiB"); return; } try { @@ -133,7 +129,7 @@ export function ShareUploadClient() {