Socket
Book a DemoInstallSign in
Socket

binary-document-uploader

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

binary-document-uploader

Upload files to binary.com platform

unpublished
latest
npmnpm
Version
2.3.2
Version published
Maintainers
2
Created
Source

binary-document-uploader

Uploading files through websocket to binary.com platform

Installation

npm install binary-document-uploader

Usage

ES6

import DocumentUploader from 'binary-document-uploader';

const uploader = new DocumentUploader(config);

RequireJS

const DocumentUploader = require('binary-document-uploader');

const uploader = new DocumentUploader(config);

Browser

<script src="./documentUploader.js"></script>
<script>
    const uploader = new DocumentUploader(config);
    uploader(file);
</script>

Example

import DocumentUploader from 'binary-document-uploader';

const uploader = new DocumentUploader(config);

uploader.upload(file)
    .then(result => console.log(`Status: ${result.status}`))
    .catch(error => console.log(error));

file (object)

File information and payload to send

file.filename

Filename

file.buffer

Array buffer containing the file to upload

file.documentType

Document type

file.documentId (optional)

Document id

file.documentFormat

Document format

file.expirationDate (optional)

Expiration date

file.chunkSize

Default: 16384 (16 KB)

config (object)

config.connection

A ready websocket connection

config.debug

Default: false

FAQs

Package last updated on 22 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.