我想上传带有缩略图的视频以使用Google Drive API V2进行驱动,我尝试了以下方法,但是上传后,视频没有缩略图(ThumbnailLink = null)
我应该怎么做?可以使用本地图像代替链接吗?如果可以,怎么办?
var uploadStream = new System.IO.FileStream("C:\tut.mp4", System.IO.FileMode.Open,
System.IO.FileAccess.Read);
var fileMetadata = new Google.Apis.Drive.v2.Data.File()
{
Title = title,
Parents = new List<Google.Apis.Drive.v2.Data.ParentReference>
{
new Google.Apis.Drive.v2.Data.ParentReference()
{
Id = folderID
}
},
ThumbnailLink = "https://ifz.com/csp042.jpg"
};
var insert = _DriveService.Files.Insert(fileMetadata, uploadStream, null);
var task = insert.UploadAsync();