AI Prompts for File Uploads
“Add an image upload with drag and drop, preview, and 5MB limit. Accept only JPG, PNG, and WebP. Show an error message if the file is too large or wrong type.”
Free AI prompt · The Code Book
A ready-to-use prompt from the chapter File Uploads. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.
“Add a multi-file upload for a photo gallery. Let users drag up to 10 images at once. Show thumbnails with individual progress bars and remove buttons for each file.”
“Add an image upload with drag and drop, preview, and 5MB limit. Accept only JPG, PNG, and WebP. Show an error message if the file is too large or wrong type.”
“Add a profile photo upload that shows a circular preview of the selected image. Include a 'Remove' button. Resize the image to 400x400 on the server before saving.”
“Set up Uploadthing for file uploads in my Next.js app. Create an upload endpoint that accepts images up to 4MB and PDFs up to 16MB. Show upload progress in the UI.”
“Add a document upload form that accepts PDFs and CSV files. Show the file name and size after selection. Upload to Supabase Storage and save the URL in the database.”
“Set up a new Next.js project with TypeScript, Tailwind CSS, and App Router. Create a clean homepage with a [header/hero/features] layout.”
“Convert my single-page app into multiple pages with proper navigation. Add routes for [home, about, dashboard, settings].”