public static Video UploadVideo(User uploader, FileUpload videoUpload)
 {
     try
     {
         ParsnipData.Media.Video myVideo = new ParsnipData.Media.Video(uploader, videoUpload.PostedFile);
         myVideo.Insert();
         return(myVideo);
     }
     catch (Exception ex)
     {
         var e = "Exception whilst uploading video: " + ex;
         new LogEntry(Log.Debug)
         {
             Text = e
         };
         Debug.WriteLine(e);
         HttpContext.Current.Response.Redirect("photos?error=video");
     }
     return(null);
 }
 public static void UploadVideo(User uploader, FileUpload videoUpload, FileUpload thumbnailUpload)
 {
     try
     {
         ParsnipData.Media.Video myVideo = new ParsnipData.Media.Video(uploader, videoUpload.PostedFile, thumbnailUpload.PostedFile);
         myVideo.Insert();
         //myVideo.Update();
         HttpContext.Current.Response.Redirect($"edit_media?id={myVideo.Id}", false);
     }
     catch (Exception ex)
     {
         var e = "Exception whilst uploading video: " + ex;
         new LogEntry(Log.Debug)
         {
             text = e
         };
         Debug.WriteLine(e);
         HttpContext.Current.Response.Redirect("photos?error=video");
     }
 }