- Overview
- Documents
This plugin allows you to upload and store any type of files to http://drp.io and retrieve informations to use them. It does not require any authentication.
Source: github.com
Oct 22, 2014 in File Upload 6668 views
This plugin allows you to upload and store any type of files to http://drp.io and retrieve informations to use them. It does not require any authentication.
Source: github.com
1. INCLUDE JS FILES
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="drp-jquery-upload.js"></script>
2. HTML
<input id="inputUpload" multiple="multiple" type="file" name="name" />
3. JAVASCRIPT
$('#input').upload({ progress: function(percentage) { console.log(percentage); }, success: function(data) { console.log(data); } });
4. OPTIONS
The optional selector $('#input') is an upload input.
Parameters | Description |
---|---|
progress | A function to show upload progress. The function gets passed the percentage of the upload. |
success | A function to be called if the request succeeds. The function gets passed the information about the image/images uploaded. |
submit | Submit button which trigger files upload (jquery element). |
files | Input files to upload. |
5. EXAMPLES
With submit button as parameter
<input id="inputUpload2" multiple="multiple" type="file" name="name" /> <input id="submitUpload2" type="submit"/>
$('#inputUpload2').upload({ submit: $('#submitUpload2'), success: function(data) { console.log(data); } });
With files parameters
<input id="inputUpload3" multiple="multiple" type="file" name="name" />
var files = $input[0].files; $.upload({ files: files, progress: function(percentage) { console.log(percentage); }, success: function(data) { console.log(data); } });
Tagged with:
drp upload jquery
image upload
upload plugin
drp.io
upload and store
retrieve informations
jquery plugin
Related Articles