This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configurando o serviço de documentação do Swagger | |
services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", | |
new Info | |
{ | |
Title = "Comparador de Fundos - Meuportfol.io", | |
Version = "v1", | |
Description = "Comparador de Fundos - Meuportfol.io. Para utilização nos procure para obter credencial", | |
Contact = new Contact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Habilitar o middleware para servir o Swagger gerado como um endpoint JSON | |
app.UseSwagger(); | |
// Habilitar o middleware para servir o swagger-ui (HTML, JS, CSS, etc.), | |
// Especificando o Endpoint JSON Swagger. | |
app.UseSwaggerUI(c => | |
{ | |
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Comparador de Fundos - Meuportfol.io"); | |
c.RoutePrefix = string.Empty; //Adicione algum proefixo da URL caso queira | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileUploadResult | |
{ | |
public long Length { get; set; } | |
public string Name { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileUploadResult | |
{ | |
public long Length { get; set; } | |
public string Name { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AspNetCoreMultipleUploadAPI.WebApi.Models; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace AspNetCoreMultipleUploadAPI.WebApi.Controllers | |
{ | |
[Route("api/file")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AspNetCoreMultipleUploadAPI.ConsoleApp.Models | |
{ | |
public class FileResult | |
{ | |
public long Length { get; set; } | |
public string Name { get; set; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace AspNetCoreMultipleUploadAPI.ConsoleApp | |
{ | |
public class UploadRestClientModel | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AspNetCoreMultipleUploadAPI.ConsoleApp.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
namespace AspNetCoreMultipleUploadAPI.ConsoleApp | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AspNetCoreMultipleUploadAPI.WebApi.Models; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace AspNetCoreMultipleUploadAPI.WebApi.Controllers | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace AspNetCoreMultipleUploadAPI.ConsoleApp | |
{ | |
public class UploadRestClientModel | |
{ |
OlderNewer