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

vue-uploader

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-uploader

Simple Vue File Uploader

  • 1.1.21
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

VueUploader

VueUploader is a Vue.js component that provides a user-friendly interface for uploading files. It supports both drag-and-drop functionality and traditional file selection.

Features

  • Drag-and-Drop Upload: Users can drag files into the drop zone to upload them.
  • File Selection: Allows users to click and select files from their file system.
  • Multiple File Support: Upload multiple files at once or restrict to a single file.
  • File Removal: Option to remove files from the list after they've been added.

Installation

Install VueUploader via npm:

npm install vue-uploader

usage / example

import VueUploader compnent in main.js:

import vueUploader from "vue-uploader";
import "vue-uploader/dist/style.css";

const app = createApp(App);
app.use(vueUploader);
app.mount("#app");

use of the VueUploader

<script setup>
import { ref } from "vue";
const files = ref();
const onFileUpload = (files) => {};
const onRemoveFile = (files) => {};
</script>
<template>
  <VueUploader
    :multiple="true"
    label="Upload or drag & drop"
    v-model="files"
  ></VueUploader>
</template>

Props and events

  • @onFileUpload="onFileUpload": This binds the onFileUpload function to the onFileUpload event of the VueUploader component, which will be triggered when a file is uploaded.
  • @onRemoveFile="onRemoveFile": This binds the onRemoveFile function to the onRemoveFile event of the VueUploader component, which will be triggered when a file is removed.
  • :multiple="false":This prop ensures that only one file can be uploaded at a time.
  • label="Upload or drag & drop": This prop sets the label or placeholder text displayed in the uploader component

Preview

App Screenshot

Thanks a lot

If you appreciate my work and want to support future projects, consider buying me a coffee! ☕️

Buy Me A Coffee

Keywords

FAQs

Package last updated on 08 Oct 2024

Did you know?

Socket

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.

Install

Related posts

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