{"repo":"TimMikeladze/next-upload","free":true,"listed":false,"github":"https://github.com/TimMikeladze/next-upload","clone":"git clone https://github.com/TimMikeladze/next-upload.git","description":"🗃️ Turn-key solution for signed & secure file-uploads to an S3 compliant storage service such as R2, AWS, or Minio. Built for Next.js. Generates signed URLs for uploading files directly to your storage service and optionally integrates with a database to store additional metadata about your files.","language":"TypeScript","stars":112,"topics":["blob-storage","next","nextjs","r2","s3","signed-url","upload","uploads","next-upload","hacktoberfest"],"license":"MIT","category":"databases-storage","readme_excerpt":"🗃️ next-upload A turn-key solution for integrating Next.js with signed & secure file-uploads to an S3 compliant storage service such as R2, AWS, or Minio. Generates signed URLs for uploading files directly to your storage service and optionally integrates with your database to store additional metadata about your files. Check out this example of a Next.js codebase showcasing an advanced implementation of next-upload with different storage services and databases. 🚧 Under active development. Expect breaking changes until v1.0.0. 📡 Install 👋 Hello there! Follow me @linesofcode or visit linesofcode.dev for more cool projects like this one. 🚀 Getting Started First let's create a NextUploadConfig that defines how to connect to a storage service, different types of file uploads, size limits and more. The example below uses AWS S3 as the storage service but you can use any S3 compatible service. src/app/upload/config.ts Now to integrate with Next.js we need to create an HTTP route that will handle next-upload related requests such as generating signed URLs. In the example below we are using a POST route at /upload with the Next.js App router. If you are using the Pages router or a different framework you can leverage the NextUpload.pagesApiHandler or NextUpload.rawHandler functions directly to achieve the same result. 🔒 This a good place to add authentication to your upload route to restrict who has access to upload files. src/app/upload/route.ts At this point you can import he","default_branch":null,"files":null,"tree":[],"storefront":"/r/TimMikeladze","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TimMikeladze/next-upload/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}