private void UploadButtonClick(object sender, RoutedEventArgs e) { if (Path.GetExtension(FileToUpload.Path).ToLower() == ".mp4") { var uploader = new VideoUploader(); Helper.ShowNotify("We will notify you once your video uploaded...", 3000); uploader.UploadVideo(FileToUpload, ThumbnailFile, CaptionText.Text, VideoBitmapDecoder, CurrentCroppedRectForVideo); } else { var uploader = new PhotoUploaderHelper(); Helper.ShowNotify("We will notify you once your photo uploaded...", 3000); uploader.UploadSinglePhoto(FileToUpload, CaptionText.Text, UserTags); MainPage.Current?.ShowMediaUploadingUc(); if (NavigationService.Frame.CanGoBack) { NavigationService.GoBack(); } } //using (var photo = new PhotoHelper()) //{ // var fileToUpload = await photo.SaveToImageForPost(files[0]); // Random rnd = new Random(); // Uploader.UploadSinglePhoto(fileToUpload, "TEEEEEEEEEEST\r\n\r\n\r\n" + DateTime.Now.ToString()); //} }
private void UploadButtonClick(object sender, RoutedEventArgs e) { if (Path.GetExtension(FileToUpload.Path).ToLower() == ".mp4") { var uploader = new VideoUploader(); Helper.ShowNotify("We will notify you once your video uploaded...", 3000); uploader.UploadVideo(FileToUpload, ThumbnailFile, CaptionText.Text, Editor.ScaledCropRect); } else { var uploader = new PhotoUploaderHelper(); Helper.ShowNotify("We will notify you once your photo uploaded...", 3000); uploader.UploadSinglePhoto(FileToUpload, CaptionText.Text, UserTags); MainPage.Current?.ShowMediaUploadingUc(); if (NavigationService.Frame.CanGoBack) { NavigationService.GoBack(); } } }