tencentyun / cos-js-sdk-v4 Goto Github PK
View Code? Open in Web Editor NEW腾讯云 COS JS SDK(JSON API)
Home Page: https://www.qcloud.com/product/cos
License: MIT License
腾讯云 COS JS SDK(JSON API)
Home Page: https://www.qcloud.com/product/cos
License: MIT License
执行至 sliceList()
时,发送 POST
请求:
opt.sign = sign;
var url = that.getCgiUrl(opt.path, opt.sign);
var formData = new FormData();
formData.append('op', 'upload_slice_list');
$.ajax({
type: 'POST',
dataType: "JSON",
url: url,
data: formData,
....
我在调试过程中,url
的值为:
//sh.file.myqcloud.com/files/v2/1252950871/gjstorage2/hugeFile.zip?sign=kRmulURP%2F%2FHwAdSQ44p9IIaJdw9hPTEyNTI5NTA4NzEmaz1BS0lEdmxUNVp3M2I0TlZVSkdqR0Y0a0hkcHFmT3dLWHBqZU4mZT0xNDk4NTU0NzA2JnQ9MTQ5ODU1NDEwNSZyPTE5NjcwNzA2MTYmZj0vMTI1Mjk1MDg3MS9nanN0b3JhZ2UyLyZiPWdqc3RvcmFnZTI%3D
这个时候POST
请求返回了404,导致直接执行到 defer.reject();
。
我使用的是 V4 版本, 问题出在哪呢?
CosCloud.prototype.cosapi_cgi_url = "//REGION.file.myqcloud.com/files/v2/";
//1.搭建一个鉴权服务器,自己构造请求参数获取签名,推荐实际线上业务使用,优点是安全性好,不会暴露自己的私钥
能简单说一下如何构造这个签名函数吗?
如题。对于大视频,sha-1计算太耗时间了。
分片上传过程,会获取已有上传任务的 session,如果文件不存在,接口会返回 404。
将会创建新的上传任务,继续上传。不影响正常上传。
其中调用的接口是获取已有上传任务:
https://www.qcloud.com/document/product/436/6070
XML API 功能更丰富,v5 SDK 上传优化比较多,推荐使用 v5 SDK
https://github.com/tencentyun/cos-js-sdk-v5
部分安卓手机uploadFile方法直接返回{"readyState":0,"responseText":"","status":0,"statusText":"error"},
uploading... curr progress is NaN
你好,请问angular2能够考虑使用此插件吗,如果可以的话,应该如何引入呢
问题:
将sdk集成到我们系统的时候,发现没有取消上传的接口。只能改sdk原代码。官方是不是要考虑增一个cancelUpload之类的函数?
能上传多张图片吗?上传多张图片怎么将每张图片的进度分开,好像进度里面都不知道改进度是哪张图片的进度,那张图片成功了
如题
否则无法限制签名的权限。例如我希望让用户在前台可以上传文件,但是不能列其他用户上传的文件,也不能删除文件。
按照目前的设计应该是无法实现这个限制的,这大大降低了 JS SDK 的安全性。
所有参数都设置了,php版本可以,这个版本不行,我用php生成的签名还是不行
不知道什么原因
除了多次调用之外,没有像阿里云那样的multi-select方式吗
ios9上传图片,无法识别
希望提供 bower 安装方式
最近开发微信公众号,使用html5开发,有文件上传的功能中使用了腾讯云提供的js cos-js-sdk-v4类库,上传图片到腾讯云盘,经过多种机型的测试发现,在iphone6s 版本号为10.0.2的系统中都无法上传图片,上传图片的API cos.uploadFile(successCallBack, errorCallBack, progressCallBack, bucket, folder + fileName, file, 0, taskReady) 调用上传方法后,直接进入错误回调 errorCallBack,弹出的错误回调result.responseText内容为空字符串。在多台iphone6s上都是出现同样的问题,将iphone6s的系统升级到最新后,上传文件正常。请问这是SDK的兼容性问题吗?
safrai上传 前端、后端签名都会报错
其他浏览器暂时没发现问题
有没有 原生javascript的支持呀,感觉你这个库脱离了jq跑不起来呀
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.