In case it is helpful, this is python-launchpad-bugs' implementation of a convenient storeblob API. We have used that in apport for years:
import storeblob
def progress_callback(sent, total): print 'uploaded %i of %i bytes' % (sent, total)
use_staging = True blob = open('/tmp/data') ticket = storeblob.upload(blob, progress_callback, staging=use_staging)
In case it is helpful, this is python- launchpad- bugs' implementation of a convenient storeblob API. We have used that in apport for years:
import storeblob
def progress_ callback( sent, total):
print 'uploaded %i of %i bytes' % (sent, total)
use_staging = True upload( blob, progress_callback, staging= use_staging)
blob = open('/tmp/data')
ticket = storeblob.