Discussions

 View Only
  • 1.  Upload Image (JPG & PNG) using the API / SDK

    Posted 12-11-2018 22:09
    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?



  • 2.  RE: Upload Image (JPG & PNG) using the API / SDK

    Posted 12-12-2018 16:09
    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.


  • 3.  RE: Upload Image (JPG & PNG) using the API / SDK

    Posted 12-12-2018 16:10
    And those SDKs encapsulate all the MIME complications that you are referring to.


  • 4.  RE: Upload Image (JPG & PNG) using the API / SDK

    Posted 12-12-2018 20:23
    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.