0

I'm trying to upload a file using ASIHttpRequest to a classic asp script, but I've had no luck. I've been able to upload to php using the exact same ASIHttpRequest code (pasted below), but I can't figure out the ASP classic script.

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];

Any help would be appreciated

I'd also prefer having no components

Jailpod
  • 150
  • 10
  • I don't see any classic ASP code here. – Dee Oct 31 '14 at 04:11
  • You're working php code would be more useful than what you've posted above. If you're asking how to do file uploads in classic asp there are plenty of questions about it on SO, eg http://stackoverflow.com/questions/26077411/use-request-files-in-classic-asp/26077668?noredirect=1#comment40873817_26077668 and http://stackoverflow.com/questions/12190305/how-to-upload-files-with-asp-classic. – John Oct 31 '14 at 12:23

0 Answers0