                 }
             })
 
-            dispatch_group_notify(uploadImagesGroup, dispatch_get_main_queue()) {
+            dispatch_group_notify(uploadImagesGroup, dispatch_get_main_queue()) { [weak self] in
+
+                guard uploadImageInfos.count == mediaImagesCount else {
+
+                    YepHUD.hideActivityIndicator()
+                    self?.postButton.enabled = true
+
+                    let message = uploadErrorMessage ?? NSLocalizedString("Upload failed!", comment: "")
+
+                    YepAlert.alertSorry(message: message, inViewController: self)
+
+                    return
+                }
 
                 if !uploadImageInfos.isEmpty {
 


            var uploadImageInfos = [UploadImageInfo]()

            mediaImages.forEach({ image in

                let imageWidth = image.size.width

                        defaultFailureHandler(reason, errorMessage: errorMessage)

                        dispatch_async(dispatch_get_main_queue()) {
                            uploadErrorMessage = errorMessage
                            dispatch_group_leave(uploadImagesGroup)
                        }

