def upload(urls, source, token=None, **kwargs): data = FileSource(source).read() headers = auth_header(token) if nocurl: return [request('PUT', url, data=data, headers=headers).read() for url in urls] return list(comm_pycurl.upload(urls, data, token, **kwargs))
def upload(urls, source, token=None, **kwargs): source = FileSource(source) if nocurl: return [ request('PUT', url, data=source.read(), headers=auth_header(token)).read() for url in urls ] return list(comm_pycurl.upload(urls, source, token, **kwargs))
def upload(urls, source, **kwargs): source = FileSource(source) if nocurl: return [request('PUT', url, data=source.read()).read() for url in urls] return list(comm_pycurl.upload(urls, source, **kwargs))
def upload(urls, source, token=None, **kwargs): source = FileSource(source) if nocurl: return [request("PUT", url, data=source.read(), headers=auth_header(token)).read() for url in urls] return list(comm_pycurl.upload(urls, source, token, **kwargs))