Image Upload via Postman and n8n

Dear Squidex Community ,

I am struggeling uploading a image via API to the assets of my Squidex instance.

I always get the same errors like already described here:

""Can only upload one file.""

For testing I am using n8n and Postman.

I am not really familiar with the multipart post which is used to upload it but I used s3 api many times to upload binary data which should be similar I guess.

What I need to know is what do I have to post in

  1. Body
  2. Header
  3. Query Parameters

to get the upload working.

I tried all kinds of setups but it never worked and the format how to display the binary data in the POST is not clear for me. I see some posts using urls and some binary file references but none of them worked for me:

My URL is the formatted like described here, but the Body, Header and Query parameters are not clear for me, like they are for other content types: https://cloud.squidex.io/api/docs#operation/Assets_PostAsset

https://cloud.squidex.io/api/apps/MYAPP/assets

All other API commands for GET and POST or PATCH are working without problems.

When I reference my binary property in n8n it will look like this, but I guess thats not correct:

[Object: {"data":{"mimeType":"image/png","fileExtension":"png","fileName":"logo.png","id":"filesystem:1405_3f011201-2a9c-4ebc-a173-887167673aa7"}}]

Maybe someone has a Postman or n8n template to share for the asset upload? Or a code what to put in Body, Header and Query to get it working?
That would be really nice.

You can try to import the OpenAPI definition to Postman

I did that already but Postman is making a mess of the file, even if I disable the fallback and example functions on import. Nowhere to get “create Asset”

Would be really nice to have a clean OpenAPI Sample of:

Header
Body
and Query

for Image Upload via API.

This works for me: