Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
jQuery File Input plugin ezdz multiple files and grid preview
It is based on Ezdz jQuery File Input plugin. new features have been added as follows.
All other settings pls refer to ezdz documentation https://github.com/jaysalvat/ezdz
index.html file demostrates multiple file upload features and preview of image features.
remember add multiple
attribute to input tag.
in the html head section
<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.
<input type="file" name="file_upload[]" accept="image/png, image/jpeg" multiple/>
add javascript pointing to input tag, add customize configuration.
$('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.
.image-g li {
float: left;
max-width: 32%;
max-height: 48%;
padding: 0.10em;
}
.image-g li:nth-child(3n+1) {
clear: left;
}
v0.4.2 the repository update to mirror ezdz 0.4.2
v0.4.3 add example to Ezdz plugin
The MIT License (MIT)
FAQs
jQuery File Input plugin ezdz with multiple files support and grid preview.
The npm package ezdz receives a total of 24 weekly downloads. As such, ezdz popularity was classified as not popular.
We found that ezdz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.