
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
bootstrap-imageupload-src
Advanced tools
Warning: this repository is unmaintained. Fork at your own risk.
A Bootstrap/jQuery plugin to preview image uploads.
https://nerdy-harry.github.io/bootstrap-imageupload
Following installation options are available:
npm install bootstrap-imageupload-src --save
.$('#my-imageupload').imageupload(options);
Copy this snippet into your HTML.
<div class="imageupload panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title pull-left">Upload Image</h3>
<div class="btn-group pull-right">
<button type="button" class="btn btn-default active">File</button>
<button type="button" class="btn btn-default">URL</button>
</div>
</div>
<div class="file-tab panel-body">
<label class="btn btn-default btn-file">
<span>Browse</span>
<!-- The file is stored here. -->
<input type="file" name="image-file">
</label>
<button type="button" class="btn btn-default">Remove</button>
</div>
<div class="url-tab panel-body">
<div class="input-group">
<input type="text" class="form-control" placeholder="Image URL">
<div class="input-group-btn">
<button type="button" class="btn btn-default">Submit</button>
</div>
</div>
<button type="button" class="btn btn-default">Remove</button>
<!-- The URL is stored here. -->
<input type="hidden" name="image-url">
</div>
</div>
Name | Type | Default |
---|---|---|
allowedFormats | Array | ['jpg', 'jpeg', 'png', 'gif'] |
maxWidth | Number | 250 |
maxHeight | Number | 250 |
maxFileSizeKb | Number | 2048 |
imgSrc | String | '' |
Initializes bootstrap-imageupload. If no options are given, defaults are used.
$('#my-imageupload').imageupload({
allowedFormats: [ 'jpg' ],
maxFileSizeKb: 512,
imgSrc: "http://www.gstatic.com/webp/gallery/5.jpg"
});
Disables user input.
$('#my-imageupload').imageupload('disable');
Enables user input (after being disabled).
$('#my-imageupload').imageupload('enable');
Resets bootstrap-imageupload to its initial state. Options from initialization are preserved.
$('#my-imageupload').imageupload('reset');
The upload image by URL feature has the following limitations:
These limitations exist because the image element constructor is used to load the image. The only accurate method to verify the image format and file size, is to perform a HTTP HEAD request, which might not work because of the same origin policy. In order to avoid loading very large image files, a timeout of 3000ms is used.
FAQs
A Bootstrap/jQuery plugin to preview image uploads.
The npm package bootstrap-imageupload-src receives a total of 2 weekly downloads. As such, bootstrap-imageupload-src popularity was classified as not popular.
We found that bootstrap-imageupload-src 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.