/** * Commits the file. * * @throws StorageException * An exception representing any error which occurred during the operation. * @throws URISyntaxException */ @DoesServiceRequest private void commit() throws StorageException, URISyntaxException { if (this.options.getStoreFileContentMD5()) { this.parentFileRef.getProperties().setContentMD5(Base64.encode(this.md5Digest.digest())); } this.parentFileRef.uploadProperties(this.accessCondition, this.options, this.opContext); }
/** * Commits the file. * * @throws StorageException * An exception representing any error which occurred during the operation. * @throws URISyntaxException */ @DoesServiceRequest private void commit() throws StorageException, URISyntaxException { if (this.options.getStoreFileContentMD5()) { this.parentFileRef.getProperties().setContentMD5(Base64.encode(this.md5Digest.digest())); } this.parentFileRef.uploadProperties(this.accessCondition, this.options, this.opContext); }
properties.setContentMD5(request.getHeaderField(FileConstants.FILE_CONTENT_MD5_HEADER)); properties.setContentMD5(request.getHeaderField(Constants.HeaderConstants.CONTENT_MD5));
properties.setContentMD5(request.getHeaderField(FileConstants.FILE_CONTENT_MD5_HEADER)); properties.setContentMD5(request.getHeaderField(Constants.HeaderConstants.CONTENT_MD5));
public static void setFileProperties(CloudFile file) { file.getProperties().setCacheControl("no-transform"); file.getProperties().setContentDisposition("attachment"); file.getProperties().setContentEncoding("gzip"); file.getProperties().setContentLanguage("tr,en"); file.getProperties().setContentMD5("MDAwMDAwMDA="); file.getProperties().setContentType("text/html"); } }
fileRef.getProperties().setContentMD5("MDAwMDAwMDA="); fileRef.uploadProperties(null, options, null); fileRef.getProperties().setContentMD5(calculatedMD5); fileRef.uploadProperties(null, options, null); fileRef.download(new ByteArrayOutputStream(), null, options, null);
file.getProperties().setContentEncoding("gzip"); file.getProperties().setContentLanguage("tr,en"); file.getProperties().setContentMD5("MDAwMDAwMDA="); file.getProperties().setContentType("text/html"); file.uploadProperties();