New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

drop-upload

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drop-upload

JavaScript library to upload files via drop to textarea

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

Drop Upload

Small JavaScript library to allow dropping files in textarea.

Installation

Via npm:

$ npm install --save drop-upload

Via bower:

$ bower install jquery-miller-columns

Manual installation:

Download the latest release.

Via CDN:

<script src="//cdn.jsdelivr.net/npm/drop-upload/dist/drop-upload.min.js"></script>

Dependecies

No dependency.

Usage

Call on the desired element:

// DropUpload([parentSelector], [childSelector], [options]); eg:
DropUpload(document, 'textarea.uploadable-textarea');

First argument is the propagated target, second is the target selector (like in jQuery $(document).on('event', '.uploadable-textarea', function() {...})), third is the options.

API reference

Options

KeyDefault valueDescription
uploadPath/uploadPath to upload
uploadKeyfileKey of the file in upload content
uploadingCallbackfunction (fileName) {...}The value in the textarea during upload
uploadedCallbackfunction (fileName, path) {...}The value in the textarea after upload
decodeResponseCallbackfunction (response) {...}Decoding response
timeout0Timeout for requests (in ms)

Events

Event nameDescription
drop-upload:startUpload started
drop-upload:endUpload ended
drop-upload:successUpload ended with success
drop-upload:errorUpload failed
drop-upload:timeoutUpload failed with timeout

License

This project is under MIT License.

Keywords

drop

FAQs

Package last updated on 25 Jul 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