 
         let video = NSManagedObject(entity: entity,
                                     insertInto: managedContext)
-       
+
         video.setValue(currentVideo.getId(), forKeyPath: "id")
         video.setValue(currentVideo.getContent(), forKeyPath: "videoContent")
         video.setValue(currentVideo.getStarted(), forKeyPath: "startDate")

    @IBAction func pushToCloud() {
        let currentVideo = Video(started: Date(), asset: asset!)

        DashiAPI.uploadVideoMetaData(video: currentVideo).then { value -> Void in
            print(value)
            //            DashiAPI.uploadVideoContent(video: currentVideo).then { value -> Void in
            //                print(value)
            //            }.catch {


    // MARK: Helpers

    // save the video to core data
    func saveVideoToCoreData() {
        let currentVideo = Video(started: Date(), asset: asset!)
        guard let appDelegate =
            UIApplication.shared.delegate as? AppDelegate else {
            return
