We are currently facing a design problem associated with large (> 30 MB) file downloads. Our system currently looks like this:
Browser <---AJAX---> PHP <---OAUTH---> REST API
PHP and API are on different servers / domains.
Uploading a file from the browser to PHP and then from PHP to the API sounds like a waste to me.
So, the idea we had in mind is to use the following sequence:
- API request loading URL from API
- The API creates nonce and sends it back as a download URL
- The browser downloads the file directly to the API using the download URL.
Thus, we transmit data only once.
Is there something wrong with this?
Thank,
Pepijn
source
share