How do I use Ajax on progress with post to url

Get help using Construct 2

Post » Tue Nov 25, 2014 9:09 am

I am pushing a small array with an extract base64 string of an image file (around 600kb), but i can't seem to get the progress of the upload to show.

I added an event
on ajax progress "tag"
browser log ajax.progress

this event is not even triggered.

When using ajax request url, the progress shows up fine.

I am posting the data with Content-Type application/json in the header instead of application/x-www-form-urlencoded

Does it got anything to do with that?
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Sat Feb 07, 2015 4:25 pm

I have the same problem.
It seem that:
AJAX On "tag" progress
is not triggered with AJAX Post to url
B
18
S
4
Posts: 84
Reputation: 2,085

Post » Thu Oct 01, 2015 1:16 am

I currently have the same problem. i have to download a rather large file (3MB-12MB) and the file is downloaded correctly, however, the on progress is never triggered, even if i load it over a slow connection.

@Ashley , i the manual it says
For long running requests (e.g. downloading a large file), On progress triggers periodically and updates the Progress expression with the state of the request. This is useful for making progress bars for AJAX requests.


Would you kindly specify "periodically"? Does this mean 100of a second, second, 10 seconds?

Kind regards
Patrick
B
19
S
7
G
1
Posts: 222
Reputation: 2,551

Post » Thu Oct 01, 2015 9:44 am

It's defined by the browser. I think its every couple of seconds generally but it could depend on the download speed.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,378

Post » Thu Oct 01, 2015 1:06 pm

ok, this is strange then... even if the download is finished the event is not triggered. thank you anyway ;) for now i will just use on finished.
B
19
S
7
G
1
Posts: 222
Reputation: 2,551


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 52 guests

cron