Upload files via REST API #748
Labels
bounty
enhancement
New feature or request
help wanted
Looking for contributors to resolve this issue
Milestone
We need to support something like this.
In ASP.NET Core, you can upload a file by accepting IFormFile.
https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-2.2
UD is a little different because it does it's own routing. This is where we would implement the code to accept the file somehow.
https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Controllers/ComponentController.cs#L440
I think we will have to see if we can process the body as a file somehow here:
https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Controllers/ComponentController.cs#L449
We might need to add a parameter to New-UDEndpoint to specify that this endpoint accepts a file rather than a form body.
https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Cmdlets/NewEndpointCommand.cs
The text was updated successfully, but these errors were encountered: