title: How to upload zip data with alamofire?
body: <p>I try to upload data using Alamofire</p>
  
  <p>Issue is: if I try to upload image from project it works ok, but if I try to upload zip dir I got error and timeout exception </p>
  
  <p>There is my code which produces timeout exception</p>
  
  <pre><code>let configuration = URLSessionConfiguration.default
      configuration.timeoutIntervalForRequest = 10 // seconds
      configuration.timeoutIntervalForResource = 10
      alamoFireManager = Alamofire.SessionManager(configuration: configuration)
  
  let fileData = FileManager.default.contents(atPath: filePath)
  alamoFireManager.upload(fileData,
                          to: url,
                          method: .post,
                          headers: headers)
          .validate()
          .responseJSON {}
  </code></pre>
  
  <p>And here is code which works fine</p>
  
  <pre><code>let configuration = URLSessionConfiguration.default
      configuration.timeoutIntervalForRequest = 10 // seconds
      configuration.timeoutIntervalForResource = 10
      alamoFireManager = Alamofire.SessionManager(configuration: configuration)
  
  let fileURL = Bundle.main.url(forResource: "MyImage", withExtension: "jpg")
  
  alamoFireManager.upload(fileURL,
                              to: url,
                              method: .post,
                              headers: headers)
          .validate()
          .responseJSON {}
  </code></pre>
  
  <p>I tried to pass Data() to <code>upload request</code> also I tried pass reference to zip dit <code>URL</code> to upload request, also I tried <code>InputStream(url: fileURL!)!</code> but without success... </p>
  
  <p>What am I doing wrong? how to send zip data to the server?</p>
  
  <p>if there is some question feel free to ask!</p>