Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ezdz

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezdz - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

index.html

2

bower.json
{
"name": "ezdz-multiple",
"version": "0.4.2",
"version": "0.4.3",
"main": [

@@ -5,0 +5,0 @@ "jquery.ezdz.js",

{
"name": "ezdz",
"version": "0.4.2",
"version": "0.4.3",
"title": "Ezdz multiple",

@@ -5,0 +5,0 @@ "description": "jQuery File Input plugin ezdz with multiple files support and grid preview.",

@@ -12,2 +12,72 @@ ezdz-multiple

index.html file demostrates multiple file upload features and preview of image features.
remember add `multiple` attribute to input tag.
Sample Usage
=============
in the html head section
```html
<link rel="stylesheet" href="src/jquery.ezdz.css">
<script type="text/javascript" src= "node_modules/jquery/dist/jquery.min.js"></script>
<script src="src/jquery.ezdz.js"></script>
```
in the body section, simply add normal input tag, the plugin will automatically convert it into dropzone.
```html
<input type="file" name="file_upload[]" accept="image/png, image/jpeg" multiple/>
```
add javascript pointing to input tag, add customize configuration.
```javascript
$('input[type="file"]').ezdz({
text: 'drop cover photos',
validators: {
maxWidth: 2000,
maxHeight: 2000,
maxNumber: 6
},
reject: function(file, errors) {
if (errors.mimeType) {
alert(file.name + ' must be an image.');
return;
}
if (errors.maxWidth) {
alert(file.name + ' must be width:2000px max.');
return;
}
if (errors.maxHeight) {
alert(file.name + ' must be height:2000px max.');
return;
}
if (errors.maxNumber) {
alert('you can upload maximum of 6 images');
return;
}
}
});
```
if you looking for modify preview image grid, editing `jquery.ezdz.css`, for example, the code represent 3 columns grid.
```css
.image-g li {
float: left;
max-width: 32%;
max-height: 48%;
padding: 0.10em;
}
.image-g li:nth-child(3n+1) {
clear: left;
}
```
Release Note

@@ -17,2 +87,4 @@ =============

v0.4.2 the repository update to mirror ezdz 0.4.2
v0.4.3 add example to Ezdz plugin

@@ -19,0 +91,0 @@ License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc