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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ldupload

v1.2.18

Published

upload.js

Downloads

43

Readme

ldupload.js是什么? 本组件是定制化的大文件断点上传组件,支持暂停/续传,多文件上传,断点续传等核心功能; 前端技术核心点是基于ajax2.0 的二进制文件传输实现,浏览器需要IE10+,chrome 或者其他高级浏览器,JS原生,无外部依赖 可以定义文件分割大小的筏值,默认起始1M分割

如何引用? 本组件支持标签引入页面使用和 npm安装使用两种方式

标签引用: 需要引入两个核心文件upload.js 以及upload.css两个文件,然后即可初始化使用,当然你可以任意修改样式成你喜欢的样子,当然你也可以修改核心源码满足你特定的业务需求

npm引用: npm install ldupload 即可使用

如何使用: dom中定义div 设定ID 如:

JS部分创建ldupload对象设置参数即可使用 如:
var ldupload = new ldUpload({
	id:'up_container',//id 必填,组件dom会插入带该dom下
	fileSizeApi:"http://192.168.200.227/uploadjs/php/filesize.php",//检查文件接口
	uploadApi:'http://192.168.200.227/uploadjs/php/upload.php',//上传文件接口
	fileSplitSize:1024 * 1000,//1M 文件切片大小限制
	fileUpLimitSize : 1024*1000 *2000, //2G 文件上传限制大小
	AllowType:['mp4','png','zip'], //允许上传文件类别
	isTableHead:true,//是否显示table的 头部信息
	uploaddone:function(data){ //上传成功回调函数,返回 成功上传文件 ID,单条成功
		console.log("外部调用--------------")
		console.log(data)
		//{issucc: 1, data: Array(1), msg: "upload success"},其中为上传成功文件的ID
	},
	uploaderror:function(data){//上传失败回调函数
		console.log("外部调用--------------")
		console.log(data)
			//{issucc: -1, msg: "error msg"}
	}
})
各个参数定义请参看代码注释

样式覆盖 建议带上自定义的ID 层叠即可覆盖

特别备注:
	该组件需要与后台接口搭配使用,接口参数请参照文档