AiWorkout_个人页

个人头像照片 AiWorkout
个人头像照片
0
1
0

个人介绍

暂无个人介绍

擅长的技术

获得更多能力
通用技术能力:
  • 前端开发
    初级

    能力说明:

    基本的计算机知识与操作能力,具备Web基础知识,掌握Web的常见标准、常用浏览器的不同特性,掌握HTML与CSS的入门知识,可进行静态网页的制作与发布。

    获取记录:

    • 2020-11-01大学考试 前端开发初级 大学参加技能测试未通过
    • 2020-11-01大学考试 大学/社区-用户参加考试
云产品技术能力:

暂时未有相关云产品技术能力~

阿里云技能认证

详细说明
暂无更多信息
正在加载, 请稍后...
暂无更多信息
  • 回答了问题 2019-07-17

    python 钉钉文件上传

    from urllib3 import encode_multipart_formdata
    import requests
    headers={}
    data={}
    url = 'https://oapi.dingtalk.com/media/upload?access_token=' + access_token + '&type=file'
    def post_files(url,headers,data,filename,filepath):

    """
        :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
        ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
        or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content-type'`` is a string
        defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
        to add for the file.
    """
    data['media']= ('test.py', open(r'C:\Users\Administrator\Desktop\test.py', 'rb').read())
    encode_data = encode_multipart_formdata(data)
    data = encode_data[0]
    headers['Content-Type'] = encode_data[1]
    r = requests.post(url, headers=headers, data=data)
    print(json.loads(r.text)["media_id"])
    

    from urllib3 import encode_multipart_formdata
    import requests
    headers={}
    data={}
    url = 'https://oapi.dingtalk.com/media/upload?access_token=' + access_token + '&type=file'
    def post_files(url,headers,data,filename,filepath):

    data['media']= ('test.py', open(r'C:\Users\Administrator\Desktop\test.py', 'rb').read())
    encode_data = encode_multipart_formdata(data)
    data = encode_data[0]
    headers['Content-Type'] = encode_data[1]
    r = requests.post(url, headers=headers, data=data)
    print(json.loads(r.text)["media_id"])
    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息