oriio-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

oriio-js

Oriio JS SDK is a simple client-side file upload service that allows you to upload files directly from your web project to your storage or application setup with Oriio. Oriio's uploader is smart in that in takes into consideration file size to either upload your file the normal way or in chunks.

Features

  • Upload files easily and efficiently.
  • Add an onProgress handler to receive feedback on file progress.
  • Upload files to your own server.

Install

npm i oriio-js

Usage

import oriio from 'oriio-js';

const options = {
   claimFile: {
      url: 'url-of-your.server',
      headers: {  }, // headers for your server
   }, // if claimFile object is passed the `openFileId` is automatically sent to your server.
   concurrency: 3, // number of concurrent requests when chunk uploading
   onProgress: handleUploadProgress,
}

oriio.upload(applicationId, options, file)
   .then(onSuccess)
   .catch(onError);

Package Sidebar

Install

npm i oriio-js

Weekly Downloads

7

Version

0.0.8

License

ISC

Unpacked Size

56.8 kB

Total Files

16

Last publish

Collaborators

  • threeaccents