j-SingleUpload
Configuration:
url{String} a target URL for the uploading (default:/api/upload/)accept{String} (optional) can contain a content-type frow browsing files e.g.image/*label{String} (optional) changes a currentinnerHTML(default:innerHTML)title{String} Tangular template for rendering a title of attachment (default:{{ name }})disabled{Boolean} disables the componentremap{String} (optional) a remap function (default:null), example:value.length ? value[0] : null
Friendly components:
This component works with loading (when the file is uploading) and message (when server throws an error) component.
Use it with <ui-component name="singleupload">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="singleupload" path="mypicture"><i class="ti ti-folder"></i>Add attachment</ui-component>
<script>
var mypicture = { name: 'my photo.jpg', url: '/download/3493874938438.jpg' };
</script>