Adding progressHandler to ajax requests

Hello,
Is there a way to add progressHandler (to monitor uploads among other things) to my requests?
Best regards;

here => cranky-smoke-fp2dsc - CodeSandbox

Thanks,
But I want to make a definite preloader (like 56% done) that increases till ends.

using ‘promise’ you can’t do it.

only with xhr.

1 Like

Yes, that’s what I mean. I didn’t find a way to do it with F7 ajax requests, is there a way? Or should I just use the vanilla JS ajax library?

Framework7.request use ‘Promise’.

your only chance is :

xhr.onprogress = (e) => console.log(e.total/e.loaded)

but it is not an easy task.
it depends on your server ‘respose-type’ and also on the client-side (browser)
don’t go into it unless it is really necessary

1 Like

Thanks, You’ve been really helpful.