     }
     
     func startUpload() {
-        if (arrImages.count > 0) {
-            delegate.startUpload(count)
+        if arrImages.count > 0 {
+            delegate.startUpload(order)
             awsClient.uploadImage(authService.getLoginUser()?.email, image: arrImages[0], success: nil, error: nil, progress: nil)
         } else {
             print("Upload without image. Maybe for testing only :-O")


class UploadManager: NSObject {
    
    var count = 0
    var arrImages: [UIImage]!
    var serverImageUrls: [String] = []
    var  awsClient: AWSClient

    
    func progressEvent(notification: NSNotification) {
        let progress = notification.userInfo!["percent"] as! Int
        delegate.uploadProgress(order, progress: progress,
                                progressAll: calcProgressAll(progress, order: order))
    }
    
    func calcProgressAll(progress: Int, order: Int) -> Int {
