Question: ```
  form: ControlGroup
  childForm1: ControlGroup
  childForm2: ControlGroup
  childForm3: ControlGroup

  constructor(fb: FormBuilder) {
    this.form = fb.group({
      name: [''],
      childForm1: fb.group({
        child1: [''],
        child2: ['']
      }),
      childForm2: fb.group({
        child3: [''],
        child4: ['']
      }),
      childForm3: fb.group({
        child5: [''],
        child6: ['']
      })
    });
  }

```

I can get `name` by two ways:

```
  console.log(this.form.find('name'));
  console.log(this.form.controls['name']);

```

But I cannot use similar way to get `child1`.

I know a way:

```
for (name in this.childForm1.controls) {
    if (name === "child1") {
        console.log(this.childForm1.controls[name]);
    }
}

```

But this still uses `childForm1` in the code.

Is it possible using only `form` and `child1` to get it? Thanks

Answer: 
Before init, I want to share a free tool (chrome app) very useful during this type of works: [DHC Rest Client](https://chrome.google.com/webstore/detail/dhc-rest-client/aejoelaoggembcahagimdiliamlcdmfm?utm_source=chrome-ntp-icon) : with this tool you can verify if your parameters, headers and your upload files work with the type of request you want to make to the server.

So, this work with **Swift 2.x** and **Alamofire 3.x**:

First of all prepare your headers:

```
let headers = [
                "Content-Type": "application/zip",
                "X-Api-Key": userApiKey,
                ...whatever you need on headers..
            ]

```

So, supposing you must send a zip file and the response will be a TEXT/HTML response type (a simple string with SUCCESS or ERROR):

```
let filePath: String! = "/Users/admin.../Documents/myZipFile.zip"
var zipData: NSData! = NSData()
do {
    zipData = try NSData(contentsOfFile: filePath, options: NSDataReadingOptions.DataReadingMappedIfSafe)
} catch {
    print("- error during get nsdata from zip file\(error)")
}
let url :String! = String(format:"...myUrl?key1=%@&key2=%@",value1,value2)
Alamofire.upload(.POST, url, headers: headers, data: zipData)
                .responseString { response in
            if response.result.isSuccess {
                  let responseValue = response.result.value
                  print("Response value is: \(responseValue)")
            } else {
               var statusCode = 0
               if (response.response != nil) {
                  statusCode = (response.response?.statusCode)!
               }
               print("Error: \(response.result.error!) with statusCode: \(statusCode)")
            }

```

Thats all but if you want to use multipartformdata you can do it passing your headers through headers dictionary with:

> 
> **.upload(<#T##method: Method##Method#>, <#T##URLString:
>  URLStringConvertible##URLStringConvertible#>, headers: <#T##[String :
>  String]?#>, multipartFormData: <#T##MultipartFormData -> Void#**>
> 
> 
>
Using [@alessandro-ornano](https://stackoverflow.com/a/35559587/2752041)'s answer I was able to make an upload signed request using `multipartFormData`:

```
func uploadProfilePicture(photo: UIImage, callback: apiCallback){
    guard let userId = _loggedInUser?["pk"].int else {
        callback(Response(success: false, responseMessage: "User not logged in"))
        return
    }

    let requestData: requestDataType = ["timestamp": "\(Int(NSDate().timeIntervalSince1970))"]
    let headers = self.signRequest(requestData)

    _alamofireManager
        .upload(.POST, "\(_apiBaseUrl)profiles/\(userId)/photo/", headers: headers, multipartFormData: { formData in
            if let imageData = UIImageJPEGRepresentation(photo, 1){
                formData.appendBodyPart(data: imageData, name: "upload", fileName: "userphoto.jpg", mimeType: "image/jpg")
            }
            for (k, v) in requestData {
                formData.appendBodyPart(data: v.dataUsingEncoding(NSUTF8StringEncoding)!, name: k)
            }
        }, encodingCompletion: { encodingResult in
            switch encodingResult {
            case .Success(let upload, _, _):
                upload.responseJSON { response in
                    self.responseHandler(response, callback: callback) // Class' private method
                }
            case .Failure(let encodingError):
                print(encodingError)
                self.dispatch_callback(callback, response: Response(success: false, responseMessage: "Unable to encode files for upload")) // Class' private method
            }
        })
}

```