def upload_file_to_shock(self, file_path, token):
    '\n        Use HTTP multi-part POST to save a file to a SHOCK instance.\n        '
    if (token is None):
        raise Exception('Authentication token required!')
    header = {'Authorization': 'Oauth {0}'.format(token)}
    if (file_path is None):
        raise Exception('No file given for upload to SHOCK!')
    with open(os.path.abspath(file_path), 'rb') as data_file:
        files = {'upload': data_file}
        response = requests.post((self.shockURL + '/node'), headers=header, files=files, stream=True, allow_redirects=True)
    self.check_shock_response(response, 'Error trying to upload contig FASTA file {} to Shock: '.format(file_path))
    return response.json()['data']
Use HTTP multi-part POST to save a file to a SHOCK instance.
def upload_file_to_shock(self, file_path, token):
    '\n        \n        '
    if (token is None):
        raise Exception('Authentication token required!')
    header = {'Authorization': 'Oauth {0}'.format(token)}
    if (file_path is None):
        raise Exception('No file given for upload to SHOCK!')
    with open(os.path.abspath(file_path), 'rb') as data_file:
        files = {'upload': data_file}
        response = requests.post((self.shockURL + '/node'), headers=header, files=files, stream=True, allow_redirects=True)
    self.check_shock_response(response, 'Error trying to upload contig FASTA file {} to Shock: '.format(file_path))
    return response.json()['data']