Uploading Files With Next.js 14 Using Server Actions with Strapi 5 @CodingWithPaulBrats
Uploading Files With Next.js 14 Using Server Actions with Strapi 5  @CodingWithPaulBrats
Uploaded October 2024 | Updated September 2026, 2 weeks ago
Let's learn how to upload files using server actions with Zod validation to Strapi 5.
✨ Code: github.com/PaulBratslavsky/next-strapi-5-file-upload-example

In this video, we will look at how to handle file uploads in Next.js using server actions and a Strapi backend.

The process involves making requests to an endpoint to upload files. Strapi 5 is a headless CMS that facilitates quick endpoint creation.

This video will cover simple and multi-part uploads, including error handling for file size and required fields using Zod.

Our project is built with Typescript, React, Next.js, and Shadcn UI to style our project.

Topics include:
- Setting up a front-end form in Next.js for image uploads, utilizing Shadcn UI for styling.

- Implementing server-side validation using Zod to check for valid image files and required descriptions.

- The flow of data from the front-end form to the Strapi backend, including creating posts with uploaded images.

- The flexibility of a headless CMS allows users to manage uploads directly from a front-end application instead of the admin interface.

- There are many great benefits of using a headless CMS and Next.js together to build full-stack applications.

Key Points:
- Understanding File Uploads: I’ll explain the general concept of file uploading, where we make a request to an endpoint to send our files.

- Using Strapi: I’ll showcase how Strapi allows you to create endpoints swiftly and manage file uploads efficiently.

- Front-End Integration: Discover how we utilize Next.js along with the elegant Shetan UI library to create a user-friendly interface for file uploads.

- Error Handling: Learn about basic error handling mechanisms to ensure that your file uploads are smooth and user-friendly.

- Multi-Part Uploads: I’ll demonstrate how to handle multi-part uploads, allowing users to submit additional data like descriptions alongside their images.

- Server-Side Validation: Understand the importance of validating file inputs on the server side to ensure data integrity.

- Building a Custom Admin Area: I’ll touch on the flexibility of exposing specific endpoints to your users, empowering them to manage content directly from your Next.js frontend.

Don’t forget to like, share, and subscribe for more tutorials on Next.js and Strapi! Happy coding!
Uploading Files With Next.js 14 Using Server Actions with Strapi 5Building a Video Summarizer App with Next.js 14 and Strapi 5 - Part 1 Project SetupThis Is Not How To Become a Full Stack Developer in 2026 Roadmap - Its just what I am doing.People Hate This Fact About Ai Coding #ai #claudecodeHow To Set Up Next Auth 5 in Next.js 15 [ project code included ]No matter what.  Its going to be hard. Bootcamps, Computer Science Degrees or Self Taught..Building My New Site With Remix JS and Strapi - If you are learning to code stop on by and hang out.Building Video Summarizer App with Next.js 14 and Strapi 5 - Part 4 Signup Form With Server ActionsNvidia CEO Says You Should Not Learn To Code in 2024 #selftaughtdeveloperGetting Started with TanStack Start [ how to fetch data in Tanstack Start ]Next.js Crash Course 2024 Part 2:  Building Top Navigation with Shadcn UI and TailwindTesting Fable 5 To Build AI Video Editor - it kind of sucks?
Coding With Paul |

Uploading Files With Next.js 14 Using Server Actions with Strapi 5

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER