ForgeComponents
en

Components

j-PictureUpload

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • works with Bootstrap Grid System
  • drag and drop support
  • uploads a raw file (without resizing)

Configuration:

  • width {Number} a picture width (required)
  • height {Number} a picture height (required)
  • icon {String} (optional) the label icon without ti, (default: null)
  • url {String}" (optional) upload URL (default: current URL)
  • background {String} (optional) a background color (default: white)
  • src {String} an image path (default: null), e.g. /img/{0}.jpg
  • extension {Boolean} response without file extension (default: false)
  • singlefile {Boolean} response will be string instead of array (default: true)
  • new type {String} preview: output type (default: png)
  • new quality {Number} preview: output quality

Use it with <ui-component name="pictureupload">. 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.

example.html
<div style="padding:50px;max-width:300px">
	<ui-component name="pictureupload" path="picture" config="width:300;height:200;url:/upload/;icon:folder">Picture</ui-component>
</div>

<script>
	var picture = '';
</script>