You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by "Ben Asher, Sharon" <sh...@hp.com> on 2015/07/14 17:54:46 UTC
putting blob in directory in HP Cloud Object Store results in
additional empty file with directory name
Hello,
I am using version 1.8.1.
I have the following code that puts a blob in HP Cloud Object Store:
public String putObject(String container, String name, InputStream data) {
ContextBuilder storageContext = ContextBuilder.newBuilder("hpcloud-objectstorage")
.credentials(...)
.modules(...);
BlobStore bs = storageContext.buildView(BlobStoreContext.class).getBlobStore();
return bs.putBlob(container, bs.blobBuilder(name).payload(data).build());
}
I call the method with name argument that contains a directory like this
putObject("container", "folder/file", data));
what I get is the desired object named "file" under pseudo directory "folder"
however, I also get an empty (0 bytes) object named "folder" in the container root.
This is undesired.
Any thoughts?
Thanks
Sharon