                             weakSelf.delegate?.creationUploadSessionChangedState(weakSelf)
                             weakSelf.notifyServer(error, completion: { (error) -> Void in
                                 
-                                weakSelf.error = error
-                                weakSelf.isActive = false
                                 weakSelf.delegate?.creationUploadSessionChangedState(weakSelf)
                                 
-                                if let error = error
+                                if let _ = weakSelf.creationData.galleryId
                                 {
-                                    Logger.log.error("Upload \(weakSelf.localIdentifier) finished with error: \(error)")
-                                    weakSelf.delegate?.creationUploadSessionUploadFailed(weakSelf, error: error)
+                                    weakSelf.uploadToGallery(error, completion: { (error) in
+                                        
+                                        weakSelf.error = error
+                                        weakSelf.isActive = false
+
+                                        if let error = error
+                                        {
+                                            Logger.log.error("Upload \(weakSelf.localIdentifier) finished with error: \(error)")
+                                            weakSelf.delegate?.creationUploadSessionUploadFailed(weakSelf, error: error)
+                                        }
+                                        else
+                                        {
+                                            Logger.log.debug("Upload \(weakSelf.localIdentifier) finished successfully")
+                                        }
+                                        completion?(weakSelf.creation, ErrorTransformer.errorFromResponse(nil, error: error))
+                                    })
                                 }
                                 else
                                 {
-                                    Logger.log.debug("Upload \(weakSelf.localIdentifier) finished successfully")
+                                    weakSelf.error = error
+                                    weakSelf.isActive = false
+                                    
+                                    if let error = error
+                                    {
+                                        Logger.log.error("Upload \(weakSelf.localIdentifier) finished with error: \(error)")
+                                        weakSelf.delegate?.creationUploadSessionUploadFailed(weakSelf, error: error)
+                                    }
+                                    else
+                                    {
+
+                                        Logger.log.debug("Upload \(weakSelf.localIdentifier) finished successfully")
+                                    }
+                                    completion?(weakSelf.creation, ErrorTransformer.errorFromResponse(nil, error: error))
                                 }
-                                
-                                completion?(weakSelf.creation, ErrorTransformer.errorFromResponse(nil, error: error))
                             })
                         })
                     })

        currentRequest = requestSender.send(request, withResponseHandler: handler)
    }
    
    //MARK: - Utils
    private class func documentsDirectory() -> String
    {

    case UploadPathObtained = 3
    case ImageUploaded = 4
    case ServerNotified = 5
    case SubmittedToGallery = 6
    case Cancelled = 7
}

protocol CreationUploadSessionDelegate: class
