Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If you don't set a timeout, your request may hang indefinitely. The timeout parameter is used for connect and read timeouts. The whole request may take longer than the timeout; but if the connection takes longer than the timeout, or if the connection fails to send more data for an interval longer than the timeout, it will fail. I chose 5 seconds for the upload_file, which (at least when run on replicate infrastructure) is always to an endpoint in the same data center. I chose 10 seconds for downloading URLFile inputs as they may be making a request over the public internet.
- Loading branch information