The current Callback use case it too narrow: just record upload progress. But It can be more broad.
Raising exceptions from Callback can be used to implement limiting the file upload size (in upload_fileobj ). When exception is caught, abort the file upload and reraise it.
The current
Callback
use case it too narrow: just record upload progress. But It can be more broad. Raising exceptions fromCallback
can be used to implement limiting the file upload size (inupload_fileobj
). When exception is caught, abort the file upload and reraise it.