示例#1
0
        public async Task <OperationResult> CreateBlob(Stream payload, string key)
        {
            var endpoint = ToUri(key);
            var exist    = await _bucketClient.ExistBlob(endpoint);

            if (exist)
            {
                return(new OperationResult(false, "Blob already exist", HttpStatusCode.BadRequest));
            }
            return(await _bucketClient.PutBlob(payload, endpoint));
        }
示例#2
0
 public Task <bool> ExistBlob(Uri key)
 {
     return(_bucketClient.ExistBlob(key));
 }