JS Image Loader 1.3

Description
It鈥檚 a JavaScript code that can be easy integrated into any web application and work in actual web browsers. After the integration you can add images into the form and they will be uploaded on server. Images can be moved or rotated and they all will be resized automatically on the client side. Besides selected images the form can contain any additional input fields.
How to Integrate
1. Include stylesheet and scripts into the head of the page:<link href="imageloader.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="jquery-1.7.min.js"></script> <script type="text/javascript" src="imageloader.min.js"></script>2. Add a form into the body of the document:
<form class="imageloaderForm" method="post" action="save.php"> <input type="button" class="imageloaderBrowse" value="Browse Images"> <input type="button" class="imageloaderClear" value="Clear All"> <div class="imageloaderFiles" /> <input type="submit" value="Send Form"> </form>3. Add a script to init ImageLoader:
document.addEventListener("DOMContentLoaded", function () {
ImageLoader.init({
limit: 5, // files limit
resize: true, // resize images or not (true/false)
moveSpeed: 100, // animation speed during sorting
maxWidth: 500, // max width if 'resize' enabled
maxHeight: 500, // max height if 'resize' enabled
isJpeg: false, // images format is JPEG or PNG with alpha channel (true/false)
jpegQuality: 0.8, // jpeg quality of images if 'isJpeg' enabled (from 0 to 1)
jpegBg: '#FFFFFF', // background fill color if 'isJpeg' enabled
form: 'imageloaderForm', // form class name
files: 'imageloaderFiles', // files container class name
file: 'imageloaderFile', // file class name
image: 'imageloaderImage', // image class name
ghost: 'imageloaderGhost', // file ghost class name when sorting
btnBrowse: 'imageloaderBrowse', // browse button class name
btnClear: 'imageloaderClear', // clear button class name (optional)
btnRotate: 'imageloaderRotate', // rotate button class name
btnRemove: 'imageloaderRemove', // remove button class name
rotateTitle: 'Rotate', // rotate button title
removeTitle: 'Remove', // remove button title
filter: ['.jpeg', '.jpg', '.png', '.gif', '.bmp', '.ico'], // files type filter
onSubmit: function(form){ // form submit handler (optional)
// ... validate the form if it's needed
return true; // return false to prevent uploading the form
},
onFinish: function(form, data){ // form uploaded handler (optional)
alert('ImageLoader: Form has been uploaded');
// ... redirect to another page or make something with returned data
},
onError: function(error){ // form error handler (optional)
alert('ImageLoader: ' + error);
}
});
})
4. Form will be uploaded asynchronously using an AJAX request. Variable names will have the prefix imageloader so you can easy identify them from others. Here is an example of code how to save images on PHP:
foreach($_FILES as $item => $value){
if(substr($item, 0, 11) == 'imageloader'){
$filename = str_replace('_', '.', $item); // filename
move_uploaded_file($value['tmp_name'], $filename);
}
}| Type | JavaScript Script |
|---|---|
| Author | OlDenWeb |
| Category | Javascript / Loaders And Uploaders |
| Price | $16 |
| Sales | 99 |
| Rating | 2.71 from 7 ratings |
| Published | Jun 26, 2016 |
| Last Update | Mar 31, 2018 |
| Compatible Browsers | IE10, IE11, Firefox, Opera, Chrome, Edge |
| Compatible Software | jQuery |
| Source Files Included | JavaScript JS, HTML, CSS, PHP |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit馃
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website 路 12,847 views 路 46 clicksWebsite 路 Week 49 路 12,847 views 路 46 clicks
馃
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website 路 7,964 views 路 10 clicksWebsite 路 Week 49 路 7,964 views 路 10 clicks
馃
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website 路 15,624 views 路 28 clicksWebsite 路 Week 49 路 15,624 views 路 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website 路 7,784 views 路 2 clicksWebsite 路 Week 49 路 7,784 views 路 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website 路 7,679 views 路 4 clicksWebsite 路 Week 49 路 7,679 views 路 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website 路 7,591 views 路 0 clicksWebsite 路 Week 49 路 7,591 views 路 0 clicks