j-FileUpload
Is very helpful component for uploading e.g. profile photos. I consider this component as inline file upload. Look into the html source. The component uploads files via multipart/form-data.
Configuration:
url{String} a target URL for the uploadingaccept{String} (optional) can contain a content-type frow browsing files e.g.image/*multipleenablesmultiplefiles upload (default:false)array{Boolean} enables pushing an uploaded value to array (pathmust be the array)label{String} (optional) changes a currentinnerHTML(default:innerHTML)disabled{Boolean} disables
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="fileupload">. 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.
<a href="javascript:void(0)"><ui-component name="fileupload" path="mypicture" config="url:/my-upload-url/">Upload</ui-component></a>
<script>
var mypicture = '';
</script>