'Upload a file chunk
http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?mpUploadUploadPart.html'

def upload_part(self, seq, offset, chunk_size, labels, buffer='', remote_status=None):

    debug(('Uploading    part    %i    of    %r    (%s    bytes)' % (seq, self.upload_id, chunk_size)))
    if (remote_status is not None):
        if (int(remote_status['size']) == chunk_size):
            checksum = calculateChecksum(buffer, self.file_stream, offset, chunk_size, self.s3.config.send_chunk)
            remote_checksum = remote_status['checksum'].strip('"\'')
            if (remote_checksum == checksum):
                warning(('MultiPart:    size    and    md5sum    match    for    %s    part    %d,    skipping.' % (self.uri, seq)))
                self.parts[seq] = remote_status['checksum']
                return
            else:
                warning(('MultiPart:    checksum    (%s    vs    %s)    does    not    match    for    %s    part    %d,    reuploading.' % (remote_checksum, checksum, self.uri, seq)))
        else:
            warning(('MultiPart:    size    (%d    vs    %d)    does    not    match    for    %s    part    %d,    reuploading.' % (int(remote_status['size']), chunk_size, self.uri, seq)))
    headers = {'content-length': str(chunk_size)}
    query_string_params = {'partNumber': ('%s' % seq), 'uploadId': self.upload_id}
    request = self.s3.create_request('OBJECT_PUT', uri=self.uri, headers=headers, uri_params=query_string_params)
    response = self.s3.send_file(request, self.file_stream, labels, buffer, offset=offset, chunk_size=chunk_size)
    self.parts[seq] = response['headers'].get('etag', '').strip('"\'')
    return response
