'Create FileUpload instance from local file.'

def upload(self, addon, path):

    self.info('Creating    FileUpload...')
    package_file = open(path)
    package_size = os.stat(path).st_size
    upload = FileUpload()
    upload.user = addon.authors.all()[0]
    upload.add_file(package_file.read(), 'marketplace-package.zip', package_size)
    self.info(('Created    FileUpload    %s.' % upload))
    return upload
