Web Component: j-FileUploader
j-FileUploader
A simple component for uploading files. It supports auto-resizing images.
- jComponent
v19|v20
Configuration:
url
{String}
a default URL address for uploading
Methods:
fileuploader/upload(opt)
shows a file dialogopt.url
{String}
important URL where will be image uploadedopt.callback(response, errors)
{Function}
a callback importantopt.multiple
{Boolean}
supports multiple files (default:false
)opt.progress(percentage)
{Function}opt.accept
{String}
accept type (default:*/*
)opt.prefix
{String}
a name prefix<input name="fil
e{0}"
(default:file{0}
)opt.files
{FileList}
optional (if you use e.g Drag & Drop)opt.data
{Object}
optional, additional custom datakey_string:value_string
opt.width
{Number}
optional, image widthopt.height
{Number}
optional, image heightopt.background
{String}
optional, background color defined in HEX or can betransparent
opt.keeporiginal
{Boolean}
optional, prevents for double resizing (default:false
)opt.onlylarger
{Boolean}
optional, resizes images only larger thanopt.width
oropt.height
- NEW:
opt.base64
{String}
optional, it can contain a validdataURI
format (required to fillopt.filename
) - NEW:
opt.filename
{String}
optional, required withopt.base64
field - NEW:
opt.quality
{Number}
optional, a default JPEG quality (default:90
)
Friendly components:
This component works with loading
when the file is uploading.
Author
- Peter Širka petersirka@gmail.com
- License
Created
03. november 2020
Updated
02. october 2024
jComponent library
19 | 20
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com