Make sure have have the file support enabled in your startup:
services.AddGenericBackend() .ConfigureMiddleware(m => { // Set your options }) .ConfigureOpenApiGeneration(o => { // Set your options }) .AddFileSupport()
For uploading a file, name the parameters of your Stored Procedure with the following postfixes (at least two, content is required):
This will make the Generic Backend treat the SP as File Upload SP and therefore requiring the HTTP Request to be a Multipart/form-data Request.
In your Settings File (appsettings.json or backendconfig.json) set the field "ResultType" to "File":
"FileDownload": { "GET": { "SP": "spGetFile", "ResultType": "File" } }
The SP must return a field called Content and a field called ContentType. It may return a field called FileName as well.
Content
ContentType
FileName
There was an error while loading. Please reload this page.