我可以使用以下代码将blob(BlockBlob)上传到容器和子目录:
String storageConnectionString = "UseDevelopmentStorage=true";
CloudStorageAccount account;
CloudBlobClient serviceClient;
CloudBlobContainer container;
CloudBlockBlob blob;
account = CloudStorageAccount.parse(storageConnectionString);
serviceClient = account.createCloudBlobClient();
container = serviceClient.getContainerReference("sample");
container.createIfNotExist();
blob = container.getBlockBlobReference("myfolder/test/31-Mar/testing/testvideo.wvm");
File fileReference = new File("C:\\myvideo.wvm");
blob.upload(new FileInputStream(fileReference), fileReference.length());
如果我没有容器名称并且只有容器引用,我该如何上传?
由于