1.0.9 • Published 3 years ago

5x5_jq_uploader v1.0.9

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

5x5_jq_uploader

This plug in can be used to instantly create a dropfile area and file queue with very little setup. Uses Bootstrap for responsive layout and alerts.

Demo page can be found here.

An alternate uploader with the same functionality but written without jQuery and using Materialize for layout can be found here.

Installation

Using npm;

$ npm install jquery bootstrap 5x5_jq_uploader

Using a cdn;

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>

Basic Setup

    // in script...
    $(function(){ 
        $("#uploader").initUploader({destination:'/uploaderUrl'});
    });
    
    <!--in body-->
    <div id="uploader"></div>

Options

Options that can be specified when initializing uploader;

NameTypeDefaultDescription
destinationstringnullRequired. Path to a processing script/api
destinationParamsobjectnullKey/value pairs that can be used for creating a querystring on upload
sizeLimitinteger1Limit of individual file sizes, in MB
fileLimitinteger5Limit of total number files that can be queued for upload
selectOptsobjectnullKey/value pairs used to render a select element for each file queued for upload. Key is used for the individual option value and the key's value displayed to user. Chosen value gets appended to file object as property 'fileType'
showDescriptionbooleanfalseIf true will render a text input for each file queued for upload. Value gets appended to file object as property 'description'
postFnfunctionnoopA callback for when a upload has completed successfully
1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago