douyong8801 2011-07-13 12:00
浏览 45
已采纳

iOS不会将音乐文件上传到我的服务器

I'm trying to upload a file from my iOS device to my IIS webserver (Windows Server Web 2008) but for some reason it does not receive the request if the added file is bigger than a certain size (around 10MB it seems).

I have made a couple more questions about this matter and found a lot of answers from these. I still have a problem with the bigger files not being sent. The previous cap was at 2MB, now it's somewhere around 10MB or so. All the settings in php that could have anything to do with this have been set to either 500MB or 6000 seconds timeout. The maxRequestBuffer for IIS has been set to 500MB aswell and should not be the problem.

Looking at what i have changed allready I would think the problem lies in the app side not sending it at all. Previously the request would be sent and received by the server and the code would be fired, but the file would be ignored as it was too big at that time. However right now when i have a big file the request will not be received.

My Objective-c code is like this:

NSString *theUrl = @"myserverurl";
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:theUrl]];

[request setNumberOfTimesToRetryOnTimeout:2];
[request setShouldContinueWhenAppEntersBackground:YES];

NSTimeInterval timeOutSecs = 60000;
[request setTimeOutSeconds:timeOutSecs];

//[request setUploadProgressDelegate:(id)];

[request setFile:[soundFileURL path] forKey:@"mainfile"];
[request startSynchronous];

If anyone could tell me what is going wrong here it would help me alot! I couldn't find any methods allowing bigger files to be sent so any help on that would be great aswell! :)

Thanks in advance!!

EDIT

After some testing it seems that 11.1MB (5minutes and 48 seconds of sound) is the very maximum. Any bigger than this will result in a failed upload.

  • 写回答

2条回答 默认 最新

  • dongxiong5546 2011-07-13 15:09
    关注

    Two main areas to check:

    1. On the web server, check the logs.
    2. On the client, I've never used ASI synchronously, but if you switch to async, you can implement the -requestFailed: delegate method and analyze that error object in the debugger. (See the how-to)

    Also look in the HTTP request/response headers and see if anything interesting turns up. HTTP Scoop is a useful tool for this if you are willing to part with $15. (I am not affiliated with the authors of HTTP Scoop.)

    Also check any firewalls, filters, antivirus software, etc. between the client and the server.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器