コード例 #1
0
        public void AddOrReplace(StorageData storageData)
        {
            var putRequest = new PutObjectRequest
            {
                BucketName  = _bucketName,
                Key         = GetKey(storageData.StorageFileId),
                InputStream = new MemoryStream(storageData.Data)
            };

            _s3Client.PutObjectAsync(putRequest).Wait();
        }
コード例 #2
0
 public void AddOrReplace(StorageData storageData)
 {
     using Stream stream = new MemoryStream(storageData.Data);
     _storageClient.UploadObject(_settings.GoogleBucketName, GetObjectName(storageData.StorageFileId), "application/pdf", stream, null, null);
 }