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

@franck.freiburger/vue-file-upload

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@franck.freiburger/vue-file-upload

file upload widget

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-file-upload

File upload component

  • drag and drop / file chooser
  • multiple upload (except for IE9)
  • add more files during upload
  • overall progress bar
  • no dependency

demo

Browser support

Same browser support as Vue.js 2

Example

<template>
  <div>
    <upload url='/upload'></upload>
  </div>
</template>

Install

npm install --save @franck.freiburger/vue-file-upload

API

Properties

:url string

Target url for the uploaded files (post multipart/form-data).

:multiple boolean, default: false

Allow multiple files to be uploaded simultaneously.

:image boolean, default: false

Indicate that you wish to upload images.

:capture boolean, default: false

Indicates that the capture of media directly from the device's environment using a media capture mechanism is preferred. See capture attribute

:accept function(filename) returns boolean

Called before a file is about to be uploaded. Return false to reject the upload, otherwise return true.

filename: The filename (without path) of the file.

By default any file is accepted.

:done function(status, responseText, feedback)

Called when a file or a set of files has been uploaded.

status: HTTP status of the upload or undefined if no status is available (IE9).
responseText: reponse of the server.
feedback: function you can call to give a positive or negative (true/false) UI feedback about the upload.

By default, if the property is not defined, a positive feedback is send for HTTP status 2xx and 3xx

:data string

Extra data sent with files (name=data).

Slots

default slot

This slot is included at the center of the component.

exemple:

<upload url='/upload' image capture><i class="fa fa-camera fa-2x"></i></upload>

using default slot

Credits

Franck Freiburger

Keywords

FAQs

Package last updated on 09 Jan 2018

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