huhuanming / qiniu_upload Goto Github PK
View Code? Open in Web Editor NEW支持批量上传的七牛上传 SDK, 不依赖任何第三方库
License: MIT License
支持批量上传的七牛上传 SDK, 不依赖任何第三方库
License: MIT License
你好,我cocoaPods下载最新的库,但是用不了,有些方法被弃用了,有些block也不对,[uploader startUploadWithAccessToken:qiniuToken];也用不了,请问你能更新下文档吗,谢谢,或者能加一下你的联系方式呢
ALAsset 太老了吧
能否加入方法自定义 URL?
My code: (in swift)
let qToken = QiniuToken(scope: "abc", secretKey: "-mykey", accesskey: "myak")
let data = NSData(contentsOfFile: NSBundle.mainBundle().resourcePath! + "/myfile.mp3")
let file = QiniuFile(fileData: data)
let uploader = QiniuUploader(token: qToken)
uploader.addFile(file)
uploader.delegate = self
uploader.startUpload()
Only uploadAllFilesComplete being called. Any suggestion? Thanks.
上传时总是会出现这个错误.
是哪设置不对?
我用的还是2.X的版本,暂时没有更新到最新的.
经常出现,不知道是哪的问题?
返回的index 能否根据 传的files数组的顺序来返回
uploadOneFileFailed在定义的时候,参数error为NSDictionary类型,但是在QiniuUploader中使用的时候却是NSError类型
亲测可用bridge方式使用到swift工程。
已stared。
下面这些标题都没有被识别出来,其实#后面需要加个空格,例如:
###如何开始 -> ### 如何开始
###如何开始
####从 CocoaPods 安装
#####Podfile pod "QiniuUpload"
####手动安装
复制Classes目录下的类到工程项目中就行了。
####开始编码
###QiniuToken
sample:
// fileName = /var/mobile/Containers/Data/Application/03521F90-5F3D-4F22-AC18-53F130AFAA5E/Library/Caches/C6BFF8CD64F842C3878D9452A15CA789_20160107134914_001.mp4
qiniuFile = [[QiniuFile alloc] initWithAssetURL: [NSURL fileURLWithPath:fileName]];
[_uploader addFile:qiniuFile];
上传时会报无法加载图片,源码默认从assert里面加载,建议兼容自定义的文件名称路径。
而批量的使用initWithFileData会大量占用内容。
你好,现在progress正常工作,上传也很好。不过还是不明白怎样获取刚上传那个文件的url。代码如下:
uploader.uploadOneFileSucceeded = {(operation : AFHTTPRequestOperation!, index : NSInteger, key : String?) in
从什么地方获取下载地址呢(指外链地址)?谢谢
还一个问题就是,好像无法指定上传文件的文件名了吧?比如我的文件是“file.mp3”,但上传后的文件是类似这种“Gq-L37WmgldZtqdsc_BVVPf9G-Lc”.
Error Domain=https://upload.qbox.me Code=401 "{"error":"bad token"}
每个文件的key都是不一致的时候怎么做到用同一个token来上传呢
如题~
hope you can update support AFNetwoking 2.0+
在犹豫要不要用,看到三个月没更新了
在类QiniuToken的- (NSString *)uploadToken方法里这一句
[authInfo setObject:@"motor" forKey:@"scope"];
没有使用外部传入的scope,而是写死了一个scope
如果没有文件要上传调用上传的方法就会报错
提示:{"error":"invalid multipart format: multipart: message too large"}
将在本周内支持多文件并发,但这次更新之后将会移除一些旧的 API,
然后本项目就只维护修复 bug,不再更新新的功能了。
打算转向纯 Swift,无第三方依赖的,更模块化,支持更多服务,支持更多上传场景的 UploadKit 的开发,谢谢大家。
我有两个scope,scope1和scope2,两个scope的访问路径是不一样的。 第一次,我上传到scope1,然后我上传到scope2,这个过程中,scope1中的图片上传、读取正常。 但是我上传到scope2的图片上传失败,他实际上是上传到scope1中了
我想着,TOKEN能不能根据不同的scope生成对应Token,然后图片可以正确的上传到正确的scope,
文件上传提示成功,并且返回了 key。
上传的是图片,然后去到七牛云后台查看,图片无法显示,点击文件下载,会提示File not found.
之前是正常的,突然就都变成这样了。
直接集成了你的 SDK, 但是一直报错:
(0, Optional(Error Domain=https://upload.qbox.me Code=401 "{"error":"bad token"}" UserInfo={NSLocalizedDescription={"error":"bad token"}}))
自我以为 AK 和 SK 这些都没有问题啊,能有什么问题!!!,但是还是报错,阿里云也是这样的问题,所以转战七牛,都是 token 出问题,我是直接用你的单利生成的,看不出来有什么问题,醉了...
之前是*.qbox.me
现在是up-z2.qiniu.com
上传的图片没有后缀,浏览器可以解析,但是模拟器不行,我在上传的时候加了后缀:
let name = String.init(format: "/%@.jpeg", String.stringWithUUID())
let imagePath = UIApplication.shared.documentsPath.appending(name)
if let data = UIImageJPEGRepresentation(image, 1.0)
上传时能加入一些自定义参数吗?
七牛是可以的,分为自定义和魔法.
魔法可以直接在服务器产生token时加进去.
但自定义参数好像只能上传时加吧.
而且有些参数是和客户端相关的.
我找了半天,没找到SDK里应该怎么加进去.
这样用回调时,七牛就可以直接把这些参数给服务器端了.会方便很多.
如果已经有的话,麻烦说一下怎么调用.
谢谢
initWithToken 这个方法
两个 alloc 均有一个字节的内存泄露
目前就发现这么多,,,,
望: 尽快修复,,
PS: 你的库写的不错>--<
图片可以正常上传,视频上传会报303,这是为什么?
如题
我看了下你的 file 只支持之前的ALAsset,那么PHAsset的处理呢?建议可以加多一个上去
initWithToken 这个方法
两个 alloc 均有一个字节的内存泄露
目前就发现这么多,,,,
望: 尽快修复,,
PS: 你的库写的不错>--<
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.