Giter Site home page Giter Site logo

fossabot / uploadcare-upload-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uploadcare/uploadcare-js-api-clients

0.0 1.0 0.0 880 KB

JavaScript library for work with Uploadcare Upload API

Home Page: https://uploadcare.com/docs/api_reference/upload/

License: MIT License

JavaScript 100.00%

uploadcare-upload-client's Introduction

Uploadcare Upload Client

Library for work with Uploadcare Upload API in Node.js and browsers.

NPM version GitHub releaseFOSSA Status ย  Uploadcare stack on StackShare

Install

npm install @uploadcare/upload-client --save

Usage

import UploadClient from '@uploadcare/upload-client'

const client = new UploadClient({publicKey: 'YOUR_PUBLIC_KEY'})

client.api.request({path: 'info', query})
  .then(response => console.log(response.data))

client.api.info(uuid)
  .then(data => console.log(data.is_image))

const directUpload = client.api.base(fileData)

directUpload
  .then(data => console.log(data.file))

directUpload.onProgress = (progressEvent) => console.log(progressEvent.total / progressEvent.loaded)

const filePromise = client.fileFrom('object', fileData)

filePromise
  .then(file => console.log(file.uuid))

filePromise.onProgress = (progress => {
  console.log(progress.state)
  console.log(progress.uploadProgress.total / progress.uploadProgress.loaded)
  console.log(progress.value)
})

Security issues

If you think you ran into something in Uploadcare libraries which might have security implications, please hit us up at [email protected] or Hackerone.

We'll contact you personally in a short time to fix an issue through co-op and prior to any public disclosure.

Feedback

Issues and PRs are welcome. You can provide your feedback or drop us a support request at [email protected].

License

FOSSA Status

uploadcare-upload-client's People

Contributors

bautrukevich avatar fossabot avatar jeetiss avatar nd0ut avatar zmoki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.