title: How to upload a file, After opening it in an iOS app?
body: <p>I am trying to upload file to server like citrix fileSharing present in App Store.</p>
  
  <p>Using Url Schemes i am able to show my app in open with when the file is long pressed and copy it to the application</p>
  
  <p>How to upload the file after it is copied to my application after "Open with.."?</p>
  
  <pre><code>                                    NSString *urlString =[NSString stringWithFormat:@"https://suremdm1jobs.s3.amazonaws.com/1210001/File%20Store/Shared/?X-Amz-Expires=126000&amp;X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIUWYTLGYBHPCWTNQ/20170426/us-east-1/s3/aws4_request&amp;X-Amz-Date=20170426T060015Z&amp;X-Amz-SignedHeaders=host&amp;X-Amz-Signature=65b1dda18a96136d1bedd7c6da9bc8529b737370bb42f3328f24399763f48fbc"];
  
                                      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
                                      [request setURL:[NSURL URLWithString:urlString]];
                                      [request setHTTPMethod:@"PUT"];
  
                                      [request addValue:@"7919" forHTTPHeaderField: @"Content-Length"];
                                      [request addValue:@"application/json" forHTTPHeaderField: @"Content-Type"];
                                      [request addValue:@"bytes 0-7918/7919" forHTTPHeaderField: @"Content-Range"];
  
  
                                     NSMutableData *putData = [NSMutableData data];
                                      [putData appendData:[NSData dataWithData:data]];
  
  
                                      // Append
                                      [request setHTTPBody:putData];
  
  
                                      NSError *err;
                                      NSURLResponse *response;
  
                                      NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;err];
  
                                      NSString *resSrt = [[NSString alloc]initWithData:responseData encoding:NSASCIIStringEncoding];
  </code></pre>
  
  <p>What am I doing wrong. I always get a Unsupported Url error(-1002).</p>