Web Component: j-Upload
j-Upload
The component can perform uploading of files.
- easy and universal usage
- singleton
Methods:
var opt = {};
// Restricts files according to the content-type
// opt.accept = 'image/*';
// Enables multiple files
// opt.multiple = true;
// IMPORTANT:
// URL address for uploading
opt.url = '/api/upload/';
// A callback
opt.callback = function(response) {
};
opt.error = function(err) {
// Optional
// Error handling
};
// Optional, additional request data
opt.data = {};
opt.data.fieldName1 = 'value';
opt.data.fieldName2 = 'value';
// Shows file browser
SETTER('upload', 'show', opt);
Files are uploaded with these names/keys in the form file1
, file2
, file..N
.
Author
- Peter Širka petersirka@gmail.com
- License
Created
27. january 2019
Updated
21. january 2023
Version
v1
License
https://www.totaljs.com/license/
Responsive
No
Author
Peter Širka
Email
petersirka@gmail.com