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

vue-file64

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-file64

A simple way to convert files to base64 strings, with multiple and extension based filter.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Vue-File64

A simple way to convert files to base64 strings, with multiple and extension based filter.

Installation

npm i vue-file64

Importing Globally

You can import this package as usual, here as an example the package is imported globally.

import FileDialog from 'vue-file64; Vue.component('file-dialog-64', FileDialog);

Usage

<file-dialog-64
  :isInvalid="form.errors.errors.hasOwnProperty('image')"
  :accept="''"
  @output="
    (file) => {
      this.form.image = file;
    }
  "
  :label="'Upload your files'"
>
<p slot="errorMessage" class="invalid-feedback d-block"> Image is required </p>
</file-dialog-64>

Props

Prop NameTypeDescription
labelStringUsed as common html label
placeholderStringCan be used to replace the default placeholder "Choose files", however this will be overridden when files are selected
acceptStringSame as HTML accept, can be used to filter extensions, example :accept="'.jpg, .png'"
multipleBooleanEnable ability to select multiple files
isInvalidBooleanActivates the invalid class if set to true, highlights in red.

Events

EventDescription
outputReturns the base64 strings of the uploaded files.
filecountReturns the number of uploaded

Slots

Slot NameDescription
errorMessageCan be used to set your own error message.
onCompleteMake use to show something when the upload is complete. Such as previewing the files.



Feel free to contribute to this project, thanks

Keywords

FAQs

Package last updated on 30 Dec 2020

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