예제 #1
0
        public Task <PutObjectResponse> PutObjectAsync(string bucketName, string resource, Stream data, Action <PutObjectRequest> config = null, CancellationToken token = default)
        {
            PutObjectRequest req = new PutObjectRequest(bucketName, resource, data);

            config?.Invoke(req);

            return(_operations.PutAsync(req, token));
        }
예제 #2
0
파일: Upload.cs 프로젝트: LordMike/SimpleS3
        public async Task <PutObjectResponse> ExecuteAsync(CancellationToken token = default)
        {
            PutObjectResponse response = await _objectOperations.PutAsync(_request, token).ConfigureAwait(false);

            if (_ownStream)
            {
                _request.Content.Dispose();
            }

            return(response);
        }