Replies: 2 comments 1 reply
-
hmm it might not be aspire after all - seems like it's missing a anti-forgery token. I still have to figure out how I do that. following example doesn't work in for blazor antiforgery-support |
Beta Was this translation helpful? Give feedback.
1 reply
-
nevermind - I'm just using a good old controller - then binding works - I guess I just can't figure out making it work with minimal apis |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to upload multiple files from the .web project to apiservice in the aspire start app template.
Right now I'm stuck, because I either get either null or empty
IEnumerable<IFormFile>
or I getStatusCode: 415, ReasonPhrase: 'Unsupported Media Type', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent
I followed blazor upload file guide
Here's the code part for uploading from the web frontend.
program.cs
UploadTestClient.cs
Pages/UploadAssistant.razor
<InputFile name="files" OnChange="OnInputFileChange" multiple />
Pages/UploadAssistant.razor.cs
From the apiservice -
Here's the issues from panel:
here the issue is -
StatusCode: 415, ReasonPhrase: 'Unsupported Media Type', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent
But I I remove json part of the request, I get the following that files is null:
here's the request code:
Beta Was this translation helpful? Give feedback.
All reactions