1.0.12 • Published 2 years ago
@simpleimg/uploader-js v1.0.12
Simple Image Cloud - Uploader for Javascript
This module helps you integrate Simple Image Cloud with your Web App with pure Javascript. It allows users to upload images, manage and edit them from their devices, without any backend code.
Install
Embed our client library via the <script> tag in the <head>
section of each page where you’d like to use Simple Image Cloud Uploader.
<script data-api-key="[YOUR_API_KEY]"
data-lang="en-us"
data-selector="simpleimg-uploader"
src="https://static.simpleimg.io/uploader-js/index.js"></script>You can define some global variables to customize the behavior of the uploader.
| Property | Required | Type | Comment |
|---|---|---|---|
| data-api-key | required | string | Simple Image Cloud API Key. |
| data-lang | optional | 'en-us' \| 'pt-br' | Define uploader language. |
| data-selector | optional | string | Define custom selector. |
| data-user | optional | string | Set user partition. |
Quick Usage - Single Image (HTML)
- Value is going to be settled to
valueattribute. - It will returns
stringif value isstringanddata-max = 1 | undefined. - If no value, an empty string will be returned.
<input data-simple-img-uploader
type="hidden"
value="https://demo.simpleimg.io/image-1.jpg"/>Documentation
You can find the documentation for the Uploader JS Component here.
Quick Usage - Multiple Images (HTML)
- Value is going to be settled to
valueattribute. - It will returns comma separated
stringif value is comma separatedstring, or ifdata-max > 1. - If you set
data-max=2and provide 3 images, it will returns 2 images. - If no value, an empty string will be returned.
<input data-simple-img-uploader
data-max="2"
type="hidden"
value="https://demo.simpleimg.io/image-1.jpg,https://demo.simpleimg.io/image-2.jpg"/>Feedback
We want to hear your issue reports and feature requests at support@simpleimagecloud.com