我正在尝试使用 ASIFormDataRequest 上传文件
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString: uploadUrl]] autorelease];
[request setPostValue:md5sum forKey:@"md5sum"];
[request setFile:[NSString stringWithFormat:@"%@", filePath] forKey:@"database"];
[request startSynchronous];
这会记录一个错误:
"No file exists at: file://localhost/Users/thomas/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/36115C00-9352-4CD4-B5C2-C3A1CD6041FF/Documents/foo.sqlite"
但是,当我在浏览器中尝试路径时。它会立即下载文件,因此该文件确实存在。
有人有线索吗?
谢谢!