// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddCors(); services.AddControllers(); services.AddScoped <IFilesService, FilesService>(); services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo { Title = "API Web - S3", Version = "v1" }); }); var configAws = new AmazonWebServiceConfiguration(); Configuration.Bind(AmazonWebServiceConfiguration.Configure, configAws); services.AddSingleton(configAws); }
public FileController(IFilesService filesService, AmazonWebServiceConfiguration config) { _filesService = filesService; _config = config; }