-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
When using self hosting on Mono, Request.Files
is always empty.
I am using 4.0.39 with the code I had previously used here. I have tried Chrome, Safari and Postman, same result.
using System;
using ServiceStack;
namespace Testv4
{
class MainClass
{
public static void Main()
{
var appHost = new AppHost(500);
appHost.Init();
appHost.Start("http://*:8082/");
Console.ReadKey();
}
}
public class TestApp
{
[Route("/upload", "POST")]
public class UploadFileRequest {}
public class TestController : Service
{
public void Any(UploadFileRequest request)
{
Console.WriteLine(Request.Files.Length); // Always 0
}
}
}
public class AppHost : AppHostHttpListenerPoolBase
{
public AppHost(int poolSize) : base("Test Service", poolSize, typeof(TestApp).Assembly)
{
}
public override void Configure(Funq.Container container)
{
}
}
}
The html:
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<form action="/upload" method="POST" enc="multipart/form-data">
<h1>Upload File</h1>
<input type="file" name="File1" />
<input type="submit" value="Upload" />
</form>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels