0

My application structure is .Net 5 web api and Angular 11 frontend. I have an API end point (get method) which is being called from SPA and also it accepts an excel file as well from the user.

The method having different stages of operation.

  • First it will upload and the data from Excel file into SQL tables.

  • Then it clean the data based on some conditions Then uses another

  • master table data to cross check the existence of some values and do some manipulation

  • After all this, it feeds that filtered data into another table and create an Excel file and send back to the user.

All of this took around 2-3 mins to complete. So my requirement is rather than just showing some spinner from start to finish the application should show some popup with a list saying it's doing a step and when complete that step that list item get changed and new list item being added what's happening now. So user get a feeling what is actually happening.

I am pretty new with Angular. So how can I accomplish this.My apu method is async, so now it immediately send response to the frontend saying all finished. I was expecting something like sending the response after each step and handling the same in angular as well.

Please help.. Recently started with WEB APIs as well.

I missed to mention one point. Both the client and server application runs in Azure

sanforall
  • 5
  • 3
  • Have a look at this [API design pattern](http://restalk-patterns.org/long-running-operation-polling.html). – Mushroomator Mar 23 '22 at 00:54
  • From your question, you can use `XMLHttpRequest` to show Progress bar When uploading files. Refer to [link](https://stackoverflow.com/questions/15965651/progress-bar-while-uploading-large-files-with-xmlhttprequest). – Xinran Shen Mar 23 '22 at 05:47

0 Answers0