We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GET /app/versions/{version}/verify
curl api.catchchat.me/app/versions/catchchat-ios-1.2.0/verify
{ "supported": true, "message": "" }
{ "supported": false, "message": "亲爱的秒粉,你的 App 版本太低啦,赶快升级到最新版本吧。" }
使用七牛callback的方式是,先请求一个上传token,整个token里包含了上传结束后七牛要callback的信息
{ "to_users":users_id, "from_id":user_id, "from_token":token, "type":message.type, "message":message.message, "longitude":message.longitude, "latitude":message.latitude, "filename": filename, "battery_level":message.battery_level }
iOS 代码
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil]; NSString *base64Encoded = [jsonData base64EncodedStringWithOptions:0];
parameters = { "callbackBody":[NSString stringWithFormat:@"data=%@",base64Encoded], "type":message.type, "filename":filename }
将 创建 token 请求参数 得到的 parameters POST 到 /v2/attachments/token_callback
返回的数据中取 token 的 field
使用上一步获得的token,向服务器上传,国内使用 "http://upload.qiniu.com" 国外使用 "http://up.qiniug.com"
方法为 POST
上传类型是 multipart/form-data