Ejemplo n.º 1
0
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))
Ejemplo n.º 2
0
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))
Ejemplo n.º 3
0
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))
Ejemplo n.º 4
0
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))