How to convert the upload sample to angular stand-alone and not get the CORS error ?

1 Answer 63 Views
Top achievements
Rank 1
matthew asked on 16 Sep 2021, 03:40 PM | edited on 16 Sep 2021, 03:41 PM

So I took this sample

kendo-angular/examples-standalone/aspnetcore-upload at master · telerik/kendo-angular (


Removed these lines

            //    // To learn more about options for serving an Angular SPA from ASP.NET Core,
            //    // see

            //    spa.Options.SourcePath = "ClientApp";

            //    if (env.IsDevelopment())
            //    {
            //        spa.UseAngularCliServer(npmScript: "start");
            //    }

changed this line to..


  <kendo-upload [saveUrl]="'https://localhost:44316/api/Upload'" [removeUrl]="'api/Remove'" [withCredentials]="'false'"> </kendo-upload>

Then loaded the ClientApp in VS code.. Ran it and got the cors error...


I tried to add these lines below but I still got the same error.  What minimal changes do I need to do with this sample to split out the server and client ?


 builder =>




1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Sep 2021, 08:27 AM

Hi Matthew,

The most straightforward approach to split the application is to cut the ClientApp and place it in another folder, then run the following commands:

  • npm install
  • ng s

This will run the client application as a standalone. However, I would recommend creating the application from scratch using Angular version 12 and, if desired copy some of the source code from the demo app.

I hope this helps.

Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question