当前位置:首页 > 技术分享

七牛html js上传带进度条源码

admin5年前 (2021-04-08)技术分享4492

七牛html js上传带进度条源码

注册链接https://s.qiniu.com/uM7RJv

完整代码下载:

https://n802.com/f/349707-489018989-c141f6(访问密码:5036)

http://www.yimuhe.com/file-4879048.html

https://www.90pan.com/b2462703 密码:5y07

<script type="text/javascript">
	var token = "";//上传token
	var fname = "";//生成后的文件路径及文件名
	var domain = "";//完整个域名用于生成完整图片路径
	var config = {
		useCdnDomain: true,
		disableStatisticsReport: false,
		retryCount: 6,
		region: qiniu.region.z1 //七牛服务器 华东z0 华北z1 华南z2 北美na0 新加坡as0
	};
</script>
<link rel="stylesheet" type="text/css" href="qiniu/circle.css" />
<script type="text/javascript" src="qiniu/qiniu.min.js"></script>
<div>
	<div class="upload_img_hanchao">
		<ul class="clearfix" style="margin:8px 0;">
			<li style="padding:0;">
				<input type="text" id="goods_video" name="goods_video" style="" class="upvideoinputa" value="" />
			</li>
			<div id="filed">
				<button class="btn btn-primary">上传视频</button>
				<input accept="audio/mp4,video/mp4" class="file-input" type="file" id="goods_video_filebutton" />
			</div>
		</ul>
		<div class="circle-bar hide" id="goods_video_totalBar">
			<div class="circle-bar-left"></div>
			<div class="circle-bar-right"></div>
			<div class="mask"><span class="percent speed">0%</span></div>
		</div>
	</div>
</div>
<script>
	var callback = function(res) {
		if (res.status) {
			$("#goods_video").val(domain + "/" + res.key);
		} else {
			alert("上传出错" + res.message);
		}
	};
	var putExtra = {
		obj: "#goods_video_filebutton",
		barobj: "#goods_video_totalBar",
		fname: "",
		params: {},
		mimeType: ["audio\/mp4", "video\/mp4"]
	};
	uploadWithSDK(token, putExtra, config, callback);
</script>


扫描二维码推送至手机访问。

版权声明:本文由小刚刚技术博客发布,如需转载请注明出处。

本文链接:https://blog.bitefu.net/post/155.html

分享给朋友:

“七牛html js上传带进度条源码” 的相关文章

节假日api 开源版 解密

介绍免费节假日API 开源了,可以离线调用, 可以集成到自己系统中开源地址https://gitee.com/web/holidays_api开源说明注:原百度节假日API即为本人提供,后百度apistore禁止个人开发者所以才有此独立接口…

centos 配置Let's Encrypt 泛域名https证书

centos 配置Let's Encrypt 泛域名https证书

前言2018年1月份Letsencrypt可以申请泛域名证书,这让我们部署多域名、多站点https省了很多功夫,终于可以不用维护多个域名的https证书。笔者以acme.sh为例,手把手教你配置https证书~本教程适用于centos 6.…

在CentOS 5.x 6.x里使用yum源 换阿里云国内源换vault.centos.org源

阿里云CentOS 5 的系统,无法用yum来安装应用软件。  原因:CentOS 5 在2017-03-31日已经结束支持,不再提供维护更新,所以包括阿里云镜像站的文件可能都是过时或已经有部分文件缺失。 &n…

阿里云盘 分享脚本 抢先实现文件分享功能

Win端基本所有浏览器均可进行安装安装地址:https://bbs.tampermonkey.net.cn/thread-427-1-1.html如何安装:Tampermoneky安装:谷歌浏览器参考:https://bbs.tamperm…

TeraCloud:日本免费15G网盘,支持WebDav。适合搭配Zotero,AirExplorer实现自动同步备份

TeraCloud:日本免费15G网盘,支持WebDav。适合搭配Zotero,AirExplorer实现自动同步备份

TeraCloud是日本老牌网盘,速度挺快的。注册之后输入邀请码:“SX3BY”还可获得额外的5 GB.(如果你不输入邀请码,只能有10G)。经过我自己的尝试,我发现windows自带的资源管理器同步并不好,推荐Teracloud推荐的一些…

Lodop、C-Lodop 95版本chrome跨域请求问题 has been blocked by CORS policy: Response 解决

1、打开chrome://flags/#site-isolation-trial-opt-out2、搜索Block insecure private network requests3、设置disabled4、重启chrome…

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。