1
나는 Azure blob storage에서 비디오를 다운로드하려고합니다. 하지만 다운로드 할 때마다 파일은 항상 비어 있습니다. 같은 파일을 저장소에 업로드하고 확인하여 테스트 해 보았습니다. blob 파일의 크기를 확인할 때 Azure 저장소에 비어 있습니다.Azure Blob Storage에서 비디오를 다운로드하는 방법은 무엇입니까?
//Gets the folder and the particular video to upload to YouTube
CloudBlobContainer videoscontainer = blobClient.GetContainerReference("videos");
CloudBlob videofile = videoscontainer.GetBlobReference("test.mp4");
MemoryStream videofileinmemory = new MemoryStream();
await videofile.DownloadToStreamAsync(videofileinmemory);
CloudBlobContainer container = blobClient.GetContainerReference("checkedvideos");
//Create the container if it doesn't already exist.
container.CreateIfNotExists();
container.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });
CloudBlockBlob blockBlob = container.GetBlockBlobReference("sametestfile.mp4");
blockBlob.UploadFromStream(videofileinmemory);
'videofileinmemory' 스트림의 크기는 얼마입니까? –
* blob *이 비어 있으면 다운로드 할 비디오가 없습니다. * 업로드 * 작업이 확실합니까? –
@GauravMantri 비디오의 크기는 8MB입니다. –