title: AWS S3 image upload
body: <p>I have a piece of code which uploads an image to s3 bucket. The problem is the same piece of code(same keys/configuration) is working in sample code but it's not working in my working project after a <strong>certain git commit</strong>.</p>
  
  <p>Now coming to question:Are there any framework settings? which I can reset or anything else I can try? </p>
  
  <p>Another suspicious I'm noticing is <code>let transferManager = AWSS3TransferManager.default()
  </code> This line of code is giving me a warning in the code where code is not working <code>Warning: AWSS3TransferManager is deprecated: Use</code>AWSS3TransferUtility<code>for upload and download operations.</code></p>
  
  <p>Even after the using AWSS3TransferUtility I'm not able upload to image, Code I'm using is below.</p>
  
  <pre><code>let credentialsProvider = AWSStaticCredentialsProvider(accessKey: accessKey, secretKey: secretKey)
      let configuration = AWSServiceConfiguration(region:AWSRegionType.USEast1, credentialsProvider:credentialsProvider)
      AWSServiceManager.default().defaultServiceConfiguration = configuration
      let uploadRequest = AWSS3TransferManagerUploadRequest()!
      uploadRequest.body = localUrl
      uploadRequest.key = imageUrl.lastPathComponent
      uploadRequest.bucket = S3BucketName
      uploadRequest.contentType = "image/jpg"
      uploadRequest.acl = .publicRead
      let transferManager = AWSS3TransferManager.default()
      imageRequestGroup.enter()
      loader.Handler.show()
      transferManager.upload(uploadRequest).continueWith { [weak self] (task) -&gt; Any? in
          DispatchQueue.main.async {
              loader.Handler.hide()
              if let error = task.error {
                  print("Upload failed with error: (\(error.localizedDescription))")
              }
              if task.result != nil {
                  let url = AWSS3.default().configuration.endpoint.url
                  let publicURL = url?.appendingPathComponent(uploadRequest.bucket!).appendingPathComponent(uploadRequest.key!)
                  if let absoluteString = publicURL?.absoluteString {
                      self?.imageUrlToSend = absoluteString.lastPathComponent
                  }
              }
              self?.imageRequestGroup.leave()
          }
          return nil
      }
  </code></pre>