public S3Service(IOptions <SpacesConfig> spacesConfig) { _spacesConfig = spacesConfig.Value; var credentials = new BasicAWSCredentials(_spacesConfig.AccessKey, _spacesConfig.SecretKey); var config = new AmazonS3Config { ServiceURL = _spacesConfig.ServiceUrl }; var client = new AmazonS3Client(credentials, config); TransferUtility = new TransferUtility(client); }
public UploadService(IOptions <SpacesConfig> config, S3Service s3) { _spacesConfig = config.Value; _s3 = s3; }