ASIHttpRequest到ASP Classic文件上传

时间:2014-10-31 00:13:22

标签: objective-c asp-classic asihttprequest

我尝试使用ASIHttpRequest将文件上传到经典的asp脚本,但我没有运气。我已经能够使用完全相同的ASIHttpRequest代码(下面粘贴)上传到php,但我无法弄清楚ASP经典脚本。

NSString *layoutPath = [NSString stringWithFormat:@"%@/%@", [settings layoutPath], [[layouts objectAtIndex:indexPath.row] layoutName]];

__block ASIFormDataRequest *uploadRequest = [[ASIFormDataRequest alloc] initWithURL:[device urlForUploadLayout]];
[uploadRequest setFile:layoutPath withFileName:[layoutPath stringByDeletingPathExtension] andContentType:@"application/x-plist" forKey:@"userfile"];
[uploadRequest setCompletionBlock:^
{
    // Handle response
}];
[uploadRequest startAsynchronous];

任何帮助将不胜感激

我也更喜欢没有组件

0 个答案:

没有答案