npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vuejs-uploader

v0.6.5

Published

Vue multipart uploader component

Downloads

1,641

Readme

Vuejs Uploader

Travis Build Version Coveralls github Downloads

Multipart uploader Vue component.

This uploader will optionally upload files in multipart chunks. This get's around max upload sizes allowing you to upload large files.

If prop multiple is true a file list is rendered on selecting files otherwise file upload will begin on selection.

Drag is supported and when files are dragged over the uploader the class vuejs-uploader--dragged is added to the root element.

Remaining upload parts

For resumable uploads we need to know what parts have already been uploaded so we don't bother re uploading them. This component makes use of a response property that returns an array of parts remaining that still need to be uploaded. If this property is in the response it will remove any parts in the queue that are not in that array. To make use of this property it expects to be formatted as meta.remainingParts.

Install

npm install vuejs-uploader

Usage

Basic

<uploader end-point="http://localhost:5000"></uploader>

Multiple Files

<uploader end-point="http://localhost:5000" :multiple="true"></uploader>

Multipart upload, with custom Browse button using slot api

<uploader end-point="http://localhost:5000" :multipart="true">
    <button slot="browse-btn">Select File</button>
</uploader>

<uploader end-point="http://localhost:5000" :multipart="true">
    <img slot="browse-btn" src="someimg.jpg" />
</uploader>

Available props

|Prop |Type |Required|Default|Description| |---------------------|--------|--------|-------|----------| |endPoint |String |yup | |Server end point to post requests| |multiple |Boolean | | |To allow multiple files to be added to the upload queue| |multipart |Boolean | | |Send files larger than multipartChunkSize in parts| |multipartChunkSize |Number | |2097152|Size of multipart chunks in bytes| |maxUploads |Number | |5 |Maximum number of file that can be added to the queue| |maxThumbWidth |Number | |80 |Maximum width of preview image created| |maxThumbHeight |Number | |80 |Maximum height of preview image created| |accept |String | | |Mime types to accept| |userDefinedProperties|Array | | |array of objects defined with property and optional required properties| |errorHandler |Function| | |Function passed in to handle http errors| |headers |Object | | |Headers can be added to the http requests| |disabled |Boolean | |false |Disable the uploader|

Slots

|Slot name |Single file uploader|Multi file uploader|Description| |----------|:------------------:|:-----------------:|-----------| |browse-btn| X | X |Provide your own browse button html| |clear-btn | | X |Provide your own upload list clear button html| |upload-btn| | X |Provide your own upload list upload button html| |extra | | X |Slot to add extra form elements to send along with the upload|

Demo

To demo the uploader you need a server, there is a simple php example in server/php that uses php's built in server.

Other examples will follow.

chmod 777 server/uploads
cd server/php
php -S localhost:5000