def upload_to_s3(self, key, filename):
        headers = {}
        # guess and add the mimetype to header
        content_type = mimetypes.guess_type(filename)[0]
        headers['Content-Type'] = content_type

        # add the gzip headers, if necessary
        if self.gzip and content_type in self.gzip_content_types:
            headers['Content-Encoding'] = 'gzip'

        # add the cache-control headers if necessary
        if content_type in self.cache_control:
            headers['Cache-Control'] = ''.join((
                'max-age=',
                str(self.cache_control[content_type])
            ))

        # access and write the contents from the file
        with open(filename, 'rb') as file_obj:
            if not self.dry_run:
                logger.debug("uploading %s" % filename)
                key.set_contents_from_file(
                    file_obj,
                    headers,
                    policy=self.acl
                )
            self.uploaded_files += 1
            self.uploaded_file_list.append(file_obj)
Set the Format center_across property.
dataset/ETHPy150Open datadesk/django-bakery/bakery/management/commands/publish.py/Command.upload_to_s3--crossover with--dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/format.py/Format.set_center_across