To avoid a server/PHP timeout & to show progress of the download to the user, we
use the HTTP Range header to download one chunk of the file at a time. After each
chunk, it is the browser's responsibility to call the method again to continue the download.
Input:
'continue' query param - if set to 1, will assume we are currently downloading & use
Range: HTTP header to get another chunk of the file.
Output (in JSON):
'current_size' - Current size of the partially downloaded file on disk.
'expected_file_size' - The expected finished file size as returned by the HTTP server.
'next_screen' - When the download finishes, this is the next screen that should be shown.
'error' - When an error occurs, the message is returned in this property.