Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Folder with container name is always constructed. #553

Open
JardarM opened this issue Sep 25, 2020 · 0 comments
Open

Folder with container name is always constructed. #553

JardarM opened this issue Sep 25, 2020 · 0 comments

Comments

@JardarM
Copy link

JardarM commented Sep 25, 2020

We are using SDK v12 (12.8.0) and uploading blob files to azure storage.

The problem is that the API seems to create a "root" folder for the container, which seems odd.

The code below creates this file in container box:
box/test/myfile.txt
while I would expect this:
test/myfile.txt

var localfile = "test.txt";
var containerName = "box";
var file = "test/myfile.txt";
var sc = new StorageCredentialsSharedAccessSignature(sasToken.Token);
var container = new CloudBlobClient(URI.create(sasToken.Uri),sc).getContainerReference(containerName);
var blobRef = container.getBlockBlobReference(file);
blobRef.uploadFromFile(localfile)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant