jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Asher, Sharon" <sharon.ben-as...@hp.com>
Subject putting blob in directory in HP Cloud Object Store results in additional empty file with directory name
Date Tue, 14 Jul 2015 15:54:46 GMT
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




Mime
View raw message