Forum Academy Marketplace Showcase Pricing Features

Make a new image private when loading via workflow API

I’m creating a new thing with an image field through workflow API - how can I make this image private?
I use the following JSON below (from the manual), but the “attach_to” is not defined at the moment of API call as the thing is new (for changing a thing created before it works fine). What should do in this case?
JSON:
{
filename: String
contents: Base64-encoded binary data
private: Boolean
attach_to: String
}

Hi any thoughts on this? It might be a security issue?

I am looking for the same answer. You can set an image to private via the IMAGE UPLOADER but if you are consuming the image from an external API, then how do you set it as private?

Many times images from coming external API need to be private so you can control their access via privacy rules otherwise they are potentially available via a URL.

This has to be a big deal. Perhaps theres an answer already.

You may consider using two calls. Not sure of your setting.
There already a topic about that: "Make this File private and attach this file to" possible improvements for an improvement.

I agree that actually it’s not easy.
You need to create the thing first on the first api call, send a response to the server that will contain the created item ID and then send the picture in another call.

Hello @Jici,

I read the thread but I am not sure how to setup everything in the API connector.
Some help would be great

Thanks