final String uploadedFile = blobStore.putBlob( bucketName, blob, PutOptions.Builder.multipart() );
PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false); ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions); return maxTime != null ?
PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false); ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions); return maxTime != null ?
PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false); ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions); return maxTime != null ?
.contentType(MediaType.APPLICATION_OCTET_STREAM).contentDisposition(objectName).build(); ListenableFuture<String> futureETag = blobStore.putBlob(containerName, blob, multipart());
.contentType(MediaType.APPLICATION_OCTET_STREAM).contentDisposition(objectName).build(); String eTag = blobStore.putBlob(containerName, blob, multipart());
.contentDisposition(objectName).build(); long length = blob.getPayload().getContentMetadata().getContentLength(); blobStore.putBlob(containerName, blob, multipart());
/** * Uploads the block to the cloud service. */ @Override protected void storeBlock(byte[] digest, int level, byte[] data) throws IOException { Preconditions.checkNotNull(context); String id = StringUtils.convertBytesToHex(digest); cache.put(id, data); org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore(); if (!blobStore.blobExists(cloudContainer, id)) { Map<String, String> metadata = Maps.newHashMap(); metadata.put("level", String.valueOf(level)); Blob blob = blobStore.blobBuilder(id) .payload(data) .userMetadata(metadata) .build(); String etag = blobStore.putBlob(cloudContainer, blob, multipart()); LOG.debug("Blob " + id + " created with cloud tag : " + etag); } else { LOG.debug("Blob " + id + " already exists"); } }
/** * Uploads the block to the cloud service. */ @Override protected void storeBlock(byte[] digest, int level, byte[] data) throws IOException { Preconditions.checkNotNull(context); String id = StringUtils.convertBytesToHex(digest); cache.put(id, data); org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore(); if (!blobStore.blobExists(cloudContainer, id)) { Map<String, String> metadata = Maps.newHashMap(); metadata.put("level", String.valueOf(level)); Blob blob = blobStore.blobBuilder(id) .payload(data) .userMetadata(metadata) .build(); String etag = blobStore.putBlob(cloudContainer, blob, multipart()); LOG.debug("Blob " + id + " created with cloud tag : " + etag); } else { LOG.debug("Blob " + id + " already exists"); } }
/** * Uploads the block to the cloud service. */ @Override protected void storeBlock(byte[] digest, int level, byte[] data) throws IOException { Preconditions.checkNotNull(context); String id = StringUtils.convertBytesToHex(digest); cache.put(id, data); org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore(); if (!blobStore.blobExists(cloudContainer, id)) { Map<String, String> metadata = Maps.newHashMap(); metadata.put("level", String.valueOf(level)); Blob blob = blobStore.blobBuilder(id) .payload(data) .userMetadata(metadata) .build(); String etag = blobStore.putBlob(cloudContainer, blob, multipart()); LOG.debug("Blob " + id + " created with cloud tag : " + etag); } else { LOG.debug("Blob " + id + " already exists"); } }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public static PutOptions fromPutOptions(PutOptions putOptions) { return multipart(putOptions.multipart); }
public synchronized void putIfAbsent(File file) throws FileNotFoundException { allocateContainer(); BlobStore store = context.getBlobStore(); if (!store.blobExists(container, file.getName())) { LOG.info("Uploading '{}' to '{}' blob cache.", file.getName(), container); Blob blob = context.getBlobStore().blobBuilder(container) .name(file.getName()) .payload(file) .contentLength(file.length()) .build(); store.putBlob(container, blob, multipart()); } }
public void testMultipartChunkedFileStream() throws IOException, InterruptedException { Files.copy(oneHundredOneConstitutions, new File("target/const.txt")); String containerName = getContainerName(); try { BlobStore blobStore = view.getBlobStore(); blobStore.createContainerInLocation(null, containerName); Blob blob = blobStore.blobBuilder("const.txt") .payload(new File("target/const.txt")).contentMD5(oneHundredOneConstitutionsMD5).build(); blobStore.putBlob(containerName, blob, PutOptions.Builder.multipart()); } finally { returnContainer(containerName); } } }
/** * @see PutOptions#multipart() */ public static PutOptions multipart() { return multipart(true); }