Cloud
Cloud-Dienstleistung für schnelle und effektive Analyse und Visualisierung von Daten für Ihr Business ohne eigene Applikationen zu erstellen oder zu programmieren.
Viewing Forms and Parsing Submission Results/Controllers/FormsController.cs converts the uploaded PDF into form values:[HttpPost]
public IActionResult Action()
{
try
{
var data = JObject.Parse(this.HttpContext.Request.Form["data"]);
var action = data["action"].ToString();
switch (action)
{
case "Initialize":
var initData = StiWebForm.Initialize(data, Initialize(data));
return Json(initData.Content);
default:
var result = StiWebForm.ProcessRequest(data);
return result.ContentType switch
{
"application/pdf" => new FileContentResult(result.Content as byte[], result.ContentType),
_ => Json(result.Content),
};
}
}
catch (Exception e)
{
return new ContentResult { Content = e.Message, ContentType = "text/plain" };
}
}