Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to implement file and image uploads in Next.js 15 through this comprehensive tutorial that demonstrates modern upload techniques using Pinata as a cloud storage solution. Explore the common challenges developers face with file uploads and discover practical solutions through building a complete example Next.js application. Master the fundamentals by creating and styling file input elements, then progress to setting up Pinata for cloud storage integration. Understand server-side security practices with server-only imports and implement proper state management for upload processes using isUploading states. Follow along as the tutorial covers the complete upload flow from browser to API route, then from API route to Pinata cloud storage. Discover how to display uploaded images using signed URLs and leverage CDN capabilities for optimal performance. Dive into advanced image optimization techniques including size optimization and WebP format conversion, then learn to implement the Next.js Image component effectively. Explore responsive image handling with srcSet and create custom loaders specifically for Pinata integration. Conclude by understanding how Next.js and Pinata work together as a powerful stack for modern web applications requiring robust file upload capabilities.
Syllabus
00:00 File / Image upload problems
02:06 Example Next.js app
02:43 input with type="file" + styling
06:12 Pinata setup
08:02 import server-only
09:10 isUploading state
09:43 Upload file from browser to API route
11:34 Upload file from API route to Pinata
13:30 Display image with Signed URL
17:01 CDN + Signed URL
18:01 Image optimization size, webp
19:38 Next.js Image component
20:47 srcSet
21:52 Custom loader Pinata
22:58 Next.js + Pinata stack
Taught by
ByteGrad