Download files in chunks

Prevents out-of-memory errors when downloading large files.
Merge pull request #16352 from thatch45/bp-requests_fix

Download files in chunks