Fix uploading files via url by default crashing due to MemoryError
Describe the problem
In https://gitlab.com/bramw/baserow/-/issues/788 we attempted to allow self hosters to upload files with an unlimited size to Baserow. This however inadvertantly broke upload file via url.
The USER_FILE_SIZE_LIMIT
was increased to 1TB by default. However in the upload file code this value is passed to a response.raw.read
call. This call allocates USER_FILE_SIZE_LIMIT
amount of space to download the file into. Which now fails due to the 1TB default.
Steps to reproduce
- Start a self hosted Baserow
- Try upload any file via an URL
- See the MemoryError
Environment
- Baserow Version: 1.9 and onwards
Edited by Nigel Gott