Comment 1 for bug 315358

Revision history for this message
Martin Pitt (pitti) wrote :

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)