No Able to Upload File

1 Answer 132 Views
Upload
Vijay
Top achievements
Rank 1
Vijay asked on 05 Oct 2021, 05:24 PM | edited on 06 Oct 2021, 02:37 PM

We are not able to get the formdata values in web api 2.0 (Not .NET Code).  In the http Interceptor we are passing authorization token along with files.  Is there any sample that you have to WebApi 2.0 Upload examples? 

Request Capture in Browser

------WebKitFormBoundary6Jvam5nqf7nxkSh5 Content-Disposition: form-data; name="file"; filename="folderaccesserror.PNG" Content-Type: image/png ------WebKitFormBoundary6Jvam5nqf7nxkSh5 Content-Disposition: form-data; name="documentVersionId" 123 ------WebKitFormBoundary6Jvam5nqf7nxkSh5 Content-Disposition: form-data; name="data" {"RemoteId":"10000","UserId":"so","Page":"UploadFiles","Event":"uploadEventHandler","ActionType":"S","UserName":""} ------WebKitFormBoundary6Jvam5nqf7nxkSh5--

 

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 08 Oct 2021, 10:34 AM

Hello Vijay,

Please check the following source code of a sample app that demonstrates how to use Kendo UI for Angular components with ASP.NET Web API:

https://github.com/telerik/kendo-angular/tree/master/examples-standalone/aspnetwebapi-data

Currently, we do not have an example demonstrating the Upload component integration with .Net Web API. The only standalone example that the Upload and FileSelect components are demonstrated, utilizes ASP.NET Core API and can be found here:

https://github.com/telerik/kendo-angular/tree/master/examples-standalone/aspnetcore-upload

In general, the saveUrl property of the Upload component needs to be set to a string that points to the controller which is configured to receive the files. However, any server logic is in the hands of the developer. Please check the following article which might be found helpful:

https://www.c-sharpcorner.com/article/web-ap/

Regards,
Martin
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
Upload
Asked by
Vijay
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or