Files
schedtxt_api/Controllers/ContactQueueCreationController.cs
T
kdeng00 794368883d Added model and started working on endpoint
Working on endpoint to create contacts using a file
2023-10-02 06:49:02 -04:00

34 lines
881 B
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace TextSender_API.Controllers;
[Authorize]
[ApiController]
[Route("api/v1/contact/queue")]
public class ContactQueueCreationController : ControllerBase
{
#region Fields
private readonly ILogger<ContactQueueCreationController> _logger;
#endregion
#region Constructors
public ContactQueueCreationController(ILogger<ContactQueueCreationController> logger)
{
this._logger = logger;
}
#endregion
#region Methods
[HttpPost("upload"), DisableRequestSizeLimit]
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> contactFile,
[FromForm(Name = "user_id")] string userID)
{
// TODO: Save the file on the filesystem to be processed by a separate
// system
return Ok();
}
#endregion
}