Forum Discussion

MalcolmMcDonald's avatar
MalcolmMcDonald
Qrew Cadet
12 months ago

Pipeline Bucket - Can it be used to accept files from API calls?

Hello fellow Quickbasers!

I am using an image processing API to compress and resize images before uploading to Quickbase. I have _most_ of it working using a FetchJSON pipeline step .. the original image goes out, and I get the correct response back from the image processing service. 

The next step escapes me though -- the result is not an application/json content type, it's an image/jpg result. EG the below.

HTTP/1.1 200 OK
Compression-Count: 1
Image-Width: 530
Image-Height: 300
Content-Type: image/jpeg
Content-Length: 46480

[binary]


With just pipelines, not codepages, has anyone been able to process a result like this? The Iterate over JSON step doesn't seem to work because there's no JSON schema to reference (and it's the wrong content type) .. I'm thinking maybe a bucket step would work?

Thanks in advance!

M

 



------------------------------
Malcolm McDonald
------------------------------

4 Replies

  • DougHenning1's avatar
    DougHenning1
    Community Manager

    The "Fetch JSON" channel expects the return value to be JSON, but your returned data is an image so it's not the right channel in this instance.  Instead, use "Make a Request" under "Webhooks".  Then you can reference the image data using the "content" property (e.g. {{a.content}}).

    Hope this helps!



    ------------------------------
    Doug Henning
    ------------------------------
    • MalcolmMcDonald's avatar
      MalcolmMcDonald
      Qrew Cadet

      Thanks Doug-- that does get me further -- I can now "see" the image binary in the pipeline's output - but still can't do much with it.

      Intention is for the file to be uploaded as a file attachment .. but that pipeline only accepts a URL. I tried it anyways, and it didn't take the binary. I'm stuck feeling like buckets might be an approach (limited documentation but it talks about handling files?). Ideally I'm not setting up a box account or something as a temporary URL hosting.. seems like too many steps in the chain.

      Any other thoughts?? Thanks again for your help!

      M




      ------------------------------
      Malcolm McDonald
      ------------------------------