3.0.0 • Published 2 months ago

ajnavidya-file-upload-client v3.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

File Uploader Client

This Package demonstrates a file upload mechanism that breaks files into smaller chunks for more efficient transfer and utilizes a progress bar to track the upload process.

How to Use

npm i file-upload-client

Import Into File

import Uploader from "file-upload-client";

Example

function Upload() {
  const [progress, setProgress] = useState(0);
  const [fileURL, setFileURL] = useState("");
  const getFileContext = (e) => {
    const a = Uploader({
      file: e,
      setProgress: setProgress,
      url: {
        apiOrigin: "http://localhost:3002",
        status: "/upload/status",
        upload: "/upload/files",
        complete: "/upload/complete",
      },
      setFileURL: setFileURL,
    });
  };
  console.log("progress", progress);
  console.log("fileURL", fileURL);

  return <input type="file" onChange={getFileContext} />;
}
3.0.0

2 months ago

2.0.9

2 months ago

2.0.8

2 months ago

2.0.3

2 months ago

2.0.5

2 months ago

2.0.4

2 months ago

2.0.7

2 months ago

2.0.6

2 months ago

2.0.2

3 months ago

2.0.1

3 months ago

1.0.9

3 months ago

2.0.0

3 months ago

1.0.8

3 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

7 months ago

1.0.10

7 months ago