Class BlobUploadFromUrlOptions


  • public class BlobUploadFromUrlOptions
    extends Object
    Extended options that may be passed when uploading a Block Blob from URL.
    • Constructor Detail

      • BlobUploadFromUrlOptions

        public BlobUploadFromUrlOptions​(String sourceUrl)
        Parameters:
        sourceUrl - The source URL to upload from.
    • Method Detail

      • getSourceUrl

        public String getSourceUrl()
        Returns:
        The source URL to upload from.
      • getTags

        public Map<String,​String> getTags()
        Returns:
        The tags to associate with the blob.
      • getContentMd5

        public byte[] getContentMd5()
        Returns:
        An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.
      • setContentMd5

        public BlobUploadFromUrlOptions setContentMd5​(byte[] contentMd5)
        Parameters:
        contentMd5 - An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.
        Returns:
        The updated options
      • isCopySourceBlobProperties

        public Boolean isCopySourceBlobProperties()
        Optional, default is true. Indicates if properties from the source blob should be copied.
        Returns:
        Whether properties from the source blob should be copied.
      • setCopySourceBlobProperties

        public BlobUploadFromUrlOptions setCopySourceBlobProperties​(Boolean copySourceBlobProperties)
        Optional, default is true. Indicates if properties from the source blob should be copied.
        Parameters:
        copySourceBlobProperties - Whether properties from the source blob should be copied.
        Returns:
        The updated options.
      • getSourceAuthorization

        public com.azure.core.http.HttpAuthorization getSourceAuthorization()
        Returns:
        auth header for access to source.
      • setSourceAuthorization

        public BlobUploadFromUrlOptions setSourceAuthorization​(com.azure.core.http.HttpAuthorization sourceAuthorization)
        Sets "Authorization" header for accessing source URL. Currently only "Bearer" authentication is accepted by Storage.
        Parameters:
        sourceAuthorization - auth header for access to source.
        Returns:
        The updated options.
      • setCopySourceTags

        public BlobUploadFromUrlOptions setCopySourceTags​(BlobCopySourceTagsMode copySourceTags)
        Sets the copy source tags mode
        Parameters:
        copySourceTags - Indicates if a legal hold should be placed on the blob.
        Returns:
        The updated options.