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.
vue-file-uploader
Advanced tools
This components makes file uploading easier.
npm install vue-file-uploader
import FileUploader from 'vue-file-uploader';
// Register file uploader globally
Vue.component('file-uploader', FileUploader);
// Or use it locally where you need it
components: {
FileUploader
},
methods: {
onFilesUploaded(files) {
},
onUploadFail(errors) {
},
}
...
<file-uploader
:images-only="true"
mime-types="passed-to-accept-field-of-file-input"
@uploaded="onFilesUploaded"
@fail="onUploadFail"
multiple
button-text="Select me, then just upload me, satisfaction"
:drop="false"
></file-uploader>
Component provides a way to customize its default look by using default slot.
Also you can customize progressbar. Use progressbar
slot with scope param progress
to receive percentage of progress in your custom progressbar.
// In vue < 2.5
<file-uploader>
<template slot="progressbar" scope="params">
<div class="progressbar" :style="{ width: params.progress + '%' }"></div>
</template>
</file-uploader>
// In vue 2.5+
<file-uploader>
<div slot="progressbar" scope="params" class="progressbar" :style="{ width: params.progress + '%' }"></div>
</file-uploader>
drop
parameter allows to transform file uploader to drag-n-drop zone.
There is a class .dropzone
that can be used to created styled dropzone.
// Drag and drop
<file-uploader :drop="true">
<div class="dropzone">Drop files here</div>
</file-uploader>
FAQs
Simple, but convenient and customizable file uploader
We found that vue-file-uploader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.