Sending Image as Binary Payload via REST API in Tulip

Hello everyone,

for my project, I would like to transmit an image as a binary payload via a connector using a REST API. However, I have encountered several issues.

Firstly, I cannot upload a test file directly to Tulip, which makes the testing process difficult. Is there a way to upload a file, or to use a Tulip test file?

Secondly, I need information on how to correctly transform the image into a binary payload and send it to the REST API. I want to do the same thing as in Postman. Do I need to create code for this, or is there another way embedded in Tulip?

Finally, I am not receiving any feedback on the output, which means I cannot filter the results.

Thanks in advance for your help
Cedric

Hello Cedric
I work on similar use case, sending an image in binary via connector function.
1/ For testing: it is not possible to load the picture on the function page (could be a nice feature). The only way to pass an image is to put in the input test value the URL. If your image are in variable or table, you need to get a temporary signURL via Tulip API.
2/ So far, I see limitation how Tulip make the API call compare to Postman.
With Tulip, on the multipart for FILES:

  • “content-type” is generic “application/octet-stream” and not specific to the type of file like “image/jpeg”. That lead error when API producer check which of file type are permit or not.
  • “fileName” are not the name of the file but the input attribut

Here example with Tulip call :
“files”: [
{
“name”: “file”,
“fileName”: “file”,
“Content-Disposition”: “form-data; name="file"; filename="file"”,
“Content-Type”: “application/octet-stream”
}
Compare to Postman call:
“files”: [
{
“name”: “file”,
“fileName”: “xxxxx.jpg”,
“Content-Disposition”: “form-data; name="file"; filename="xxxxx.jpg"”,
“Content-Type”: “image/jpeg”
}

I don’t know if there is a plan for Tulip to improve this in the future.

Hello

We have a new use case where we need to send image via API and we go to the limitation that on API call with file/image input, the “Content-Type”: “application/octet-stream” is not the correct.

Example for Asana, on Tulip we take picture and we would like to send this image to Asana card with the api: Upload an attachment
The result is that the file attached in Asana is not possible to open, due to the fact it don’t have any type.

What I actually do for some applications is to send the image as base64 to a node red function. There I convert to what ever I like (buffer as file) and send it to the actual API

I think you don’t need the signURL when using the base64 encoded connector input.

Yes agree, we need an extra layer to make it work (nodered or powerautomate).

FY, just post a Feature Request. Connector image input file - need the correct Type and File name - Product Suggestions - Tulip Community

The limitation is the base64 string size. I tried this for images and quickly ran into our pictures being too large in file size.

In the connector input?= When you choose image type, put in an URL and set the encryption to base64?

I have this issue in the connector output and when you try to put an base64 into the URL variable…