Getting Started
Give your customer upload experience they deserve with boomxl pre built upload button
Setting boomxl in your project is a very easy task to perform, You just need to signup, get your API KEY and initialize the boomxl framework in language of your choice. You can grab the API KEY from Configure Upload menu. The API key looks something similar to below text.
Import the boomxl javascript library
To integrate boomxl in your project, you need to import the boomxl javascript library in your project, make sure to put it in <HEAD> tag or below closing </BODY> tag, and include it before initializing the boomxl object.
Initialize boomxl object
The next most important thing is to initialize the boomxl object with various configurations according to your needs. You can check other configurations options by visiting Configuration section and configure the object as per your need. The boomxl objects accepts three arguments, the first argument is your API KEY, the second argument is Configuration object and the third argument is Callback function that will receive response in json format.
var boom_xl = new BoomXL('YOUR API KEY' , Configuration, Callback);
</script>
Start boomxl process
The next thing is to initiate boomxl processor that will start processing window, once you initialize the boomxl object with API key, configuration options and callback you need to start the process by calling process() function on created boomxl object. It will start the processing and will open boomxl processing window.
var boom_xl = new BoomXL('YOUR API KEY' , Configuration, Callback);
boom_xl.process();
</script>
Example
Below is the sample code that will initialize the boomxl library and on click of button starts the process functionality and will print the json response in div, kindly replace the API KEY with your own, else it will not work.
<button id="boom-xl-btn" onclick="boom_xl.process();" >Process</button>
<div id="boom-xl-result"></div>
<script src="https://boomxl.com/js/boom-xl.js"></script>
<script type="text/javascript">
var boom_xl = new BoomXL( 'YOUR_API_KEY' , {
columns:[
{name:"name",label:"Name"},
{name:"email",label:"Email",validation:[
{
rule: "required"
},
{
rule: "email"
}]
}]
},function(response){
document.getElementById("boom-xl-result").innerHTML = "<pre style='padding:20px;background: #111;color: #fff;font-size: 16px;'>"+JSON.stringify(response, null, 3)+"</pre>";
});
</script>