STOP Storing Images in Your Server🚫Best Way to Upload Files in Next.js (UploadThing Guide)
Автор: Thapa Technical
Загружено: 2025-12-09
Просмотров: 1701
Описание:
In this Next.js + MySQL Job Portal App (Video #51), I’m going to teach you the correct, professional, and scalable way to upload images and files in your application using UploadThing.
Most beginners make one big mistake:
👉 They store images directly in their own servers or databases.
This slows down the server, increases cost, reduces performance, and is never recommended for production.
In this video, you will learn how professionals handle file uploads:
Upload images to a dedicated storage service
Receive a secure public URL
Use that URL in your database instead of storing the image file
Keep your database lightweight, fast, and cheap
Today’s goal:
✔ Connect UploadThing with our Next.js app
✔ Configure environment variables
✔ Build fileRouter + API route
✔ Use the UploadButton in the frontend
✔ Receive an image URL on upload
✔ Understand important events like onUploadComplete
In the next video, we will store this generated URL inside our MySQL database for the Job Portal app.
----------------------------------------------------------------------------------
📂 Source Code
👉 GitHub Repo: https://github.com/thapatechnical/job...
------------------------------------------------------------------------------------
🔗 Useful Playlists
📘 Next.js Full Stack Playlist:
• Next.JS Full Course Tutorial in Hindi
⚛️ React.js Playlist:
• React.js v19 Tutorials in Hindi - 2025
💻 TypeScript Playlist:
• Typescript Tutorial for Beginners in Hindi
------------------------------------------------------------------------------------
💸 Get All My YouTube Videos' Source Code for just ₹199! Grab Now - https://thapatechnical.shop/source-code
📺 Watch the complete Node.JS Playlist here : • Node JS Tutorial for Beginners in Hindi - ...
🔥 Access Source Code, PPT & Notes here for Free : https://www.thapatechnical.com/2024/1...
------------------------------------------------------------------------
🚀 Boost Your Skills with these Pre-Requisite Videos:
🔗 Best HTML Course - • HTML Complete Tutorial for Beginners in Hi...
🔗 Best CSS Course - • Complete CSS Tutorial for Beginners in Hin...
🔗 JavaScript Basics Course Part 1 - • JavaScript Full Course Tutorial for Beginn...
🔗 JavaScript Advanced Course Part 2 - • JavaScript Advanced full Course Tutorial🔥1...
------------------------------------------------------------------------
💸 Build Your Own E-commerce Website for Free! - https://www.thapatechnical.com/2024/0...
------------------------------------------------------------------------
✌️ Join Us!
🚀 Become a Member: Unlock perks, free source code, and more Join Now : / @thapatechnical
📷 Connect on Instagram: / thapatechnical
🗨️ Join Our Discord Server: Hang out with fellow programmers Discord Link: / discord
------------------------------------------------------------------------
⌛TIMELINE⏳
0:00 – Intro to Professional Image Uploads in Next.js
1:10 – Why You Should NEVER Store Images on Your Own Server
3:40 – Logging into UploadThing Dashboard
4:10 – Installing UploadThing in Our Next.js App
4:48 – Adding Required Environment Variables
6:15 – Setting Up fileRouter (core.ts explained in depth)
12:00 – Creating API Route for Our fileRouter
14:00 – UploadThing Components Explained
15:50 – Adding UploadThing Default Styling
16:40 – Creating & Using UploadButton on Client Side
18:50 – Viewing Output in Console (Debugging Upload Result)
19:30 – MOST Important Concept: Understanding onUploadComplete
20:25 – What’s Coming in the Next Video (Saving URL in DB)
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: