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 🙏

© 2026 – Pkg Stats / Ryan Hefner

goodies-uploader

v1.0.5

Published

GoodiesUploader is an open source library that provides drag’n’drop file uploads.

Downloads

22

Readme

Goodies-Uploader

GoodiesUploader is an open source library that provides drag’n’drop file uploads.

Installing

Using npm:

$ npm install goodies-uploader

Using jsDelivr CDN:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/goodies-uploader.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/goodies-uploader.js"></script>

Using unpkg CDN:

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/goodies-uploader.css">
<script src="https://unpkg.com/[email protected]/dist/goodies-uploader.js"></script>

Example

NOTE: goodies-uploader is now activated and available as window.GoodiesUploader. This is all you need to get goodies-uploader up and running, but if you want it to look like the demo on this page, you’ll need to use the goodies-uploader.css in the dist folder.

<div id="uploader"></div>
import 'goodies-uploader/dist/goodies-uploader';
var uploader = new GoodiesUploader('#uploader', { action: 'http://172.16.2.20:10086/upload/' });

Configuration options

Option | Description | Type | Default | :-----| :-----|:-----|:-----| action                                         | 必选参数,上传的地址               | String        | - - headers | 设置上传的请求头部 | Object | - - name | 上传的文件字段名 | String | file data | 上传时附带的额外参数 | Object | - - tip | 提示说明文字 | String | - - multiple | 是否支持多选文件 | Boolean | false disabled | 是否禁用 | Boolean | false

Events

beforeUpload 上传文件之前的钩子,参数为上传的文件,若返回false则停止上传。

uploader.on('beforeUpload', function (file) {
    if (file.name.indexOf('.jpg') === -1 && file.name.indexOf('.png') === -1) {
        console.log('上传文件格式仅支持jpg、png。')
        return false;
    } else {
        return true;
    }
});

success 文件上传成功时的钩子。返回值: { response, file, fileList }

uploader.on('success', function (res) {
    console.log(res);
});

error 文件上传失败时的钩子。返回值: { file, fileList }

uploader.on('error', function (res) {
    console.log(res);
});

Try it Yourself

Demo