Next S3 Upload

The fastest way to upload files from your Next.js app to S3.
import { useS3Upload } from "next-s3-upload";

export default function UploadPage() {
  let { uploadToS3 } = useS3Upload();

  let handleFileChange = async event => {
    let file = event.target.files[0];
    let { url } = await uploadToS3(file);

    console.log("Successfully uploaded to S3!", url);
  };

  return (
    <div>
      <input type="file" onChange={handleFileChange} />
    </div>
  );
}