【问题标题】:Trello how to add attachmentsTrello如何添加附件
【发布时间】:2019-11-02 04:17:21
【问题描述】:

我正在尝试向预先创建的 Trello 卡片添加附件

我知道如何创建卡片,但到目前为止我无法找到如何在不提供 ID 的情况下添加附件(因为尚未创建卡片)

如有需要:https://developers.trello.com/advanced-reference/card

我正在使用它来创建卡片:

https://api.trello.com/1/cards?key=<myKey>&token=<myToken>&name=My+new+card+name&desc=My+new+card+description&idList=<myIdList>

【问题讨论】:

    标签: api trello windev


    【解决方案1】:

    好的,我找到了答案!

    创建卡片->过程中获取卡片ID->添加附件!

    【讨论】:

      【解决方案2】:

      我使用过 Python 3.5,它是这样工作的:

      #python 3.5.2
      
      import requests
      
      params = (
          ('key', 'yourkey'),
          ('token', 'yourtoken'),
      )
      
      files = {
          'file': ('C:\\Users\\mcronje\\Pictures\\Picture.png', open('C:\\Users\\Pictures\\Picture.png', 'rb')),
      }
      
      response = requests.post('https://api.trello.com/1/cards/ {cardidnumber}/attachments', params=params, files=files)
      
      
      print(response.text)
      

      【讨论】:

        猜你喜欢
        • 2015-07-23
        • 1970-01-01
        • 2018-05-14
        • 1970-01-01
        • 2021-12-14
        • 2018-10-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多