fdutils/web/web.py
def upload_file_to_site(local_file_path, site_upload_url, **req_kwargs):
    """ uploads a file using requests (not using chunks so don't use for very large files)

    :param local_file_path:
    :return:
    """
    data = dict(upload=os.path.basename(local_file_path))
    files = dict(upload=open(local_file_path, 'rb'))

    r = requests.post(site_upload_url, files=files, data=data, **req_kwargs)

    return r.status_code in (HTTPStatus.OK, HTTPStatus.CREATED, HTTPStatus.NO_CONTENT)
 uploads a file using requests (not using chunks so don't use for very large files)

    :param local_file_path:
    :return:
    
uploads a file using requests (not using chunks so don't use for very large files)
uploads a file using requests ( not using chunks so don ' t use for very large files )
def upload_file_to_site(local_file_path, site_upload_url, **req_kwargs):
    data = dict(upload=os.path.basename(local_file_path))
    files = dict(upload=open(local_file_path, 'rb'))
    r = requests.post(site_upload_url, files=files, data=data, **req_kwargs)
    return r.status_code in (HTTPStatus.OK, HTTPStatus.CREATED, HTTPStatus.NO_CONTENT)
def upload_file_to_site ( local_file_path , site_upload_url , ** req_kwargs ) : data = dict ( upload = os . path . basename ( local_file_path ) ) files = dict ( upload = open ( local_file_path , 'rb' ) ) r = requests . post ( site_upload_url , files = files , data = data , ** req_kwargs ) return r . status_code in ( HTTPStatus . OK , HTTPStatus . CREATED , HTTPStatus . NO_CONTENT )
uploads a file using requests (not using chunks so don't use for very large files)
uploads a file using requests ( not using chunks so don ' t use for very large files )
""" uploads a file using requests (not using chunks so don't use for very large files)

    :param local_file_path:
    :return:
    """
None
local_file_path
None
site_upload_url