Reputation: 6706
I am using ASP.NET Web API project with Swashbuckle to test a simple custom API app that accepts 2 parameters: file name and file content.
public class Parm
{
public string FileName { get; set; }
public string FileContent { get; set; }
}
Swagger:
{
"FileName": "string",
"FileContent": "string"
}
I have an issue integrating this API app with Logic apps, e.g. process all files created in OneDrive folder as follows:
File name
and File content
from the previous step.As long as uploaded files are relatively small everything works fine, however for larger files (e.g. 10 MB) FileContent
is received as null, and the logic of the process understandably fails.
Any idea what can be the reason of the problem? I've tried changing FileContent
from string
to other types (Stream
, etc.), however that wouldn't work. Only following parameters from the previous step are available: File content
, File content type
, File entity tag
, File identifier
, File name
and File path
.
Standard API's such as "Azure Blob Storage - Create blob", etc. don't have any issue processing large File content
so there surely must be a way to achieve it. Thanks.
Upvotes: 0
Views: 646
Reputation: 6706
The problem can be fixed by increasing the value of the HttpRuntimeSection.MaxRequestLength
property in the API app's Web.config:
<configuration>
<system.web>
<httpRuntime maxRequestLength="12288" />
</system.web>
</configuration>
Upvotes: 1