大家好我想把所捕获的视频从Android设备的摄像头上传到azure blob存储,但我无法在这里完成,这是我的代码。
CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);
// Create the blob client.
CloudBlobClient blobClient = storageAccount.createCloudBlobClient();
CloudBlobContainer container = blobClient.getContainerReference("clipshotitems");
final String filepath= Environment.getExternalStorageDirectory().getAbsolutePath()+"/video.mp4";
// Create the container if it does not exist.
// container.createIfNotExists();
BlobContainerPermissions containerPermissions=new BlobContainerPermissions();
containerPermissions.setPublicAccess(BlobContainerPublicAccessType.CONTAINER);
container.uploadPermissions(containerPermissions);
CloudBlockBlob blob = container.getBlockBlobReference("miniclipId");
FileInputStream file= new FileInputStream(filepath);
blob.upload(file,source.length());
p1.hide();
`