1

My request look this -

$http.post('/api/internal/Properties/' + options.property.id + '/Upload', { Buildings: Buildings })
                        .success(function (data){

on the server side, this request can take a long time to process. Up to 5 minutes. Before it can finish (res.send()), the $http.post request is being called again, every few minutes.

When it finally does finish processing, the res.send(data) is never caught on the client side. It's like it just disappears.

Anything would help. Thanks,

caden311
  • 972
  • 8
  • 22

1 Answers1

1

Each browser has it's own http request timeout. So it will not wait for 5 minutes to complete request it would just fail. Browser Timeouts .

In chrome it's 30 or 60 seconds.

In your case i suggest use sockets or something like that to show user what's up with uploading.

Hope this helps.

Community
  • 1
  • 1
Mykola Borysyuk
  • 3,373
  • 1
  • 18
  • 24
  • I was hoping there was another way around this. But I will just have to send a response once i receive the file. Then after processing just emit events and what not. Thanks. – caden311 Nov 01 '16 at 18:23