Persist upload while browsing the site

Asked

Viewed 36 times

0

It is possible to realize a upload of files and enable navigation by the site keeping it in loading in background?

The normal thing when uploading a file is to lose progress when exiting the current page. I wonder if there is a way to keep browsing but upload not get lost, it is possible?

  • Exiting the page (= loading a new address) will stop the upload. But if your navigation is all over Ajax, you can allow the navigation inside the site to remain active while uploading.

1 answer

0


If it is a Single Page Application yes, because the navigation does not make a new request for a new page, but only manipulates the DOM to change the HTML elements that are displayed. See more in: https://blog.codecasts.com.br/single-page-applications-onde-vivem-e-o-que-comem-4fc9a44f3de

Otherwise you would have to "simulate" a SPA by implementing and invoking the upload function in the widest possible context and letting your user "browse" without changing the pathname, just displaying other HTML elements according to its interaction.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.