Forum Discussion

TheoPozzy's avatar
TheoPozzy
Qrew Member
12 months ago

Upload file attachment using REST API

We have a need to build an integration with QuickBase that needs to include file attachments. In searching the QuickBase documentation, we have found an API call using XML for uploading attachments, but the REST API documentation only mentions API calls for downloading and deleting attachments.

Is there a way to upload a file attachment using a JSON message and the REST API? If so, can someone point me to the documentation?



------------------------------
Theo Pozzy
------------------------------

2 Replies

  • DougHenning1's avatar
    DougHenning1
    Community Manager

    Hey Theo, you can use the records upsert API to upload attachments:

    https://developer.quickbase.com/operation/upsert

    This page about file types shows that the attachment file data needs to be Base64 encoded:

    https://developer.quickbase.com/fieldInfo

    Example file attachment value:

    {
      "value": {
        "fileName": "report.pdf",
        "data": "aHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvQyUyQiUyQg=="
      }
    }


    Hope that helps!



    ------------------------------
    Doug Henning
    ------------------------------
    • TheoPozzy's avatar
      TheoPozzy
      Qrew Member

      Thank you, Doug. It would be nice if basic Google searches could get to those details a little easier!



      ------------------------------
      Theo Pozzy
      ------------------------------