Uploading files via angular-jwt (Angular 2)

I’m trying to find a way to upload files to a C# Web API from a website that uses Angular 2 but I am having no luck with it. The AuthHttp module has no way to send files to the API. I don’t know what to parameterize the file data on the API so that the data type matches, if it’s even possible to send files in JSON format.

I also tried to send the data as multipart/form-data, but none of the values from the FormData are present, but when I try to send a POST request via the standard @angular/http module the file shows up, which should mean I am sending the files the correct way. Even after removing global headers, it doesn’t work.

I looked around but none of the solutions seemed to work. I just want to be able to upload files to the API while also using Auth0.

Hey there!

Sorry for such delay in response! We’re doing our best in providing the best developer support experience out there, but sometimes the number of incoming questions is just too big for our bandwidth. Sorry for such inconvenience!

Do you still require further assistance from us?