public void AddOrReplace(StorageData storageData) { var putRequest = new PutObjectRequest { BucketName = _bucketName, Key = GetKey(storageData.StorageFileId), InputStream = new MemoryStream(storageData.Data) }; _s3Client.PutObjectAsync(putRequest).Wait(); }
public void AddOrReplace(StorageData storageData) { using Stream stream = new MemoryStream(storageData.Data); _storageClient.UploadObject(_settings.GoogleBucketName, GetObjectName(storageData.StorageFileId), "application/pdf", stream, null, null); }