
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
this is a support for breakpoint file upload,multi-file status management npm package produced by Netease IM frondend team.
NIMUpload是一款用于浏览器端点播上传的软件开发工具包,提供简单、便捷的方法,方便用户开发上传视频或图片文件的功能。
一共有normal版和npm package版本。
normal版直接引入相应js即可(依赖外部jQuery以及md5,需提前引入):
<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript" src="path/to/md5.js"></script>
<script type="text/javascript" src="path/to/upload.js"></script>
npm package版本,通过如下指令即可完成安装:
//安装依赖
npm i md5 superagent
// 安装NIMUpload
npm i nimupload
调用本SDK时应先在HTML文件中添加一个用于选择文件的input标签一个用于上传的button标签。其ID可以自行指定然后作为参数传入或使用默认的ID(fileInput以及fileUpload)
在初始化时,必须传入参数 AppKey、CheckSum、CurTime、Nonce,即可完成鉴权,之后即可上传视频、图像文件至自己的网易云服务器上。
<!-- 使用自定义id,需在初始化时将id传入 -->
<input type="file" id="cusInputId" value="" multiple>
<button id="cusButtonId">上传</button>
<!-- 若使用默认sdk中id,则可不传入id -->
<input type="file" id="fileInput" value="" multiple>
<button id="fileUpload">上传</button>
var Uploader = require('nimupload')//仅仅npm package需要引入
var uploader = Uploader({
// 将后台生成的appkey等信息填写至此处
'AppKey': '', // required
'CheckSum': '', // required
'CurTime': , // required
'Nonce': , // required
'fileInputId': 'cusInputId', // optional
'fileUploadId': 'cusButtonId' // options
// 事件监听方式一:
// onSelectFile: function(fileObj) {
// console.log('selected' + fileObj);
// },
// onProgress: function(file) {
// console.log('onProgress' + file);
// },
// onFinished: function(file) {
// console.log('onFinished' + file);
// },
// onError: function() {
// console.log('出错了');
// }
});
// 事件监听方式二:
uploader.on('select', function(fileObj) {
console.log('selected:' + fileObj.fileName);
});
uploader.on('progress', function(file) {
console.log('onProgress:' + file.progress);
});
uploader.on('finished', function(file) {
console.log('onFinished:' + file.fileName);
});
uploader.on('error', function() {
console.log('出错了');
});
FAQs
this is a support for breakpoint file upload,multi-file status management npm package produced by Netease IM frondend team.
The npm package nimupload receives a total of 12 weekly downloads. As such, nimupload popularity was classified as not popular.
We found that nimupload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.