我的应用需要从用户手机上传视频文件,然后在服务器上处理.问题是文件的大小可以达到200 MB以上,用户不会保持应用程序打开以等待文件上传.由于苹果不允许应用程序在后台运行超过有限的时间.如何确保上传文件.我正在使用afnetworking来设置ios 7库给出的上传任务.
如果有人能指出我正确的方向或有任何解决方案,我们将不胜感激.我已经把这个问题拖了很长时间.谢谢.
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
[manager setTaskDidSendBodyDataBlock:^(NSURLSession *session,NSURLSessionTask *task ,int64_t bytesSent, int64_t totalBytesSent,int64_t totalBytesExpectedToSend){
CGFloat progress = ((CGFloat)totalBytesSent / (CGFloat)sensize);
NSLog(@"Uploading files %lld -- > %lld",totalBytesSent,totalBytesExpectedToSend);
[self.delegate showingProgress:progress forIndex:ind];
}];
dataTask = [manager uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
if (error) {
NSLog(@"Error: %@", error);
} else {
}
}];
Run Code Online (Sandbox Code Playgroud)
我的请求是正常的多部分表单请求.
好吧,我一直在考虑使用play框架作为我的后端服务开发一个Web应用程序,并为我的前端工作提供sencha.
现在我一直在研究sencha touch和phonegap,这可以帮助我制作一个原生的android应用程序.所以这里的问题是如何将数据呈现给两个不同的设备.一个是触摸设备,另一个在适当的桌面浏览器中打开.
我应该检测请求来自哪个设备,然后加载适当的控制器或什么?我现在真的很困惑!我是网络和移动应用程序领域的新手,所以,如果有人能向我解释如何继续将是一个很大的帮助!谢谢.
extjs web-applications mobile-application playframework sencha-touch-2
好吧问题是这个:我有两个地方和两种类型的卡A和B.我可以在给定的两个地方安排多少种方式.对于这种情况,答案是:
AA
AB
BA
BB
Run Code Online (Sandbox Code Playgroud)
所以4.
类似于其他情况,如3个地方和2种类型的卡或4个地方和5种类型的卡.
这是什么通用公式?