Skip to content

Instantly share code, notes, and snippets.

@thinkjrs
Last active December 27, 2023 15:55
Show Gist options
  • Save thinkjrs/53254b7278e7a084b5ae377c35096f08 to your computer and use it in GitHub Desktop.
Save thinkjrs/53254b7278e7a084b5ae377c35096f08 to your computer and use it in GitHub Desktop.
Steps to create buckets and upload files using AWS S3 and the Next.js App Router
  1. Client uploads a file using the frontend upload component
  2. Frontend calls edge/middleware backend to get pre-signed PUT and GET request urls from AWS
  3. Frontend uses pre-signed PUT request to upload file
  4. Frontend uses pre-signed GET request to download file

Additional steps for our apps

  1. Frontend sends pre-signed GET request to backend which appends url to campaign via Promo API

https://stackoverflow.com/questions/76776562/nextjs-upload-to-s3-using-aws-sdk-v3-and-new-nextjs-app-router

https://stackoverflow.com/a/76887515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment