1.0.0 • Published 1 year ago

@rudrprasad05/image-upload v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

upload-file-to-s3

A simple utility to upload files to S3 using axios.

Installation

npm install upload-file-to-s3
import { uploadFileToS3 } from "upload-file-to-s3";

const file = new FormData();
file.append("file", selectedFile); // Assuming `selectedFile` is a File object

await uploadFileToS3(file)
  .then((response) => {
    console.log("File uploaded successfully:", response);
  })
  .catch((error) => {
    console.error("Error uploading file:", error);
  });
1.0.0

1 year ago