Upload Image (JPG & PNG) using the API / SDK

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • In Progress
I need to upload an image using the API but Quickbase has some restrictions when it comes to file uploads when adding a record with the API.

A base64-encoded file. Because of the typical file sizes, you won’t be able to upload files using a URL. You must POST the encoded file as XML.
Note that you must not use MIME encoding and must not include MIME headers. Note that many base64 encoders or base64 encoding methods are for MIME type encoding and will not work with Quick Base.
Any ideas?

Photo of GH

GH

  • 616 Points 500 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
You need access to the computer that has the files in order for this to work. What that means is you need to have your own app/web server or even a desktop from where your app calling the APIs will run from. And that means, you can use either Ruby SDK, Python SDK, .NET SDK any thing other than JavaScript SDK running from JS code pages in your app.
And those SDKs encapsulate all the MIME complications that you are referring to.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,904 Points 20k badge 2x thumb
I posted an answer to this last night from my tablet during a meeting but apparently it did not show up.

You can avoid all the encoding issues but using the FormData API and the Fetch API. Instead of calling the API you POST to the native action ?a=FinishEditRecord setting the hidden parameter subact=save. Again you are only asking for trouble using the API in this case.