示例#1
0
        public async void UploadVideo(string path, string videoKey, string thumbnailKey)
        {
            var compressedVidePath = await _videoService.CompressVideo(path);

            var videoStream = File.Open(compressedVidePath, FileMode.Open);

            var thumbnail = _videoService.GetVideoThumbnailFromFile(compressedVidePath);

            await _awss3Service.UploadFile(new MemoryStream(thumbnail), thumbnailKey, false);

            await _awss3Service.UploadFile(videoStream, videoKey, false);
        }