"use client"; import { useState } from "react"; export default function ResumeUploadPage() { const [uploading, setUploading] = useState(false); const [uploadedImages, setUploadedImages] = useState([]); const handleUpload = async (e: React.ChangeEvent) => { const files = e.target.files; if (!files) return; setUploading(true); const newImages: string[] = []; for (let i = 0; i < files.length; i++) { const file = files[i]; const formData = new FormData(); formData.append("file", file); try { const res = await fetch("/api/upload", { method: "POST", body: formData, }); const data = await res.json(); if (data.url) { newImages.push(data.url); } } catch (err) { console.error("Upload failed:", err); } } setUploadedImages([...uploadedImages, ...newImages]); setUploading(false); }; return (

📤 Upload Resume Images

Upload images of your resume design to let Horus analyze and recreate it.

{uploading && (
Uploading...
)} {uploadedImages.length > 0 && (

Uploaded Images:

{uploadedImages.map((url, i) => (
Image {i + 1}
{url}
))}
)}
); }