Prevent base url on image path save through API request

Since Cockpit doesn’t easily support saving image files through an api call, I thought of saving images on an external API. So i tried the following:

Post to

in the field

image: {


But cockpit saves its own base url in front of my external image url.
Is there a possibility to prevent cockpit CMS to automatically save the base-url of cockpit when accessing through an API post call, for example in a custom API call?

there is an add assets api entry point:


I never tried it before and tested it now. It works well. Make sure, to name your key files[].

Javascript example:

Postman example:


Hi, this example doesn’t work for me. Is there another solution now to send images via API?

What is it that you are trying to accomplish? And in which way does the example not work out as expected?

Hi, It works very well, I forgot to declare the file as a file.

var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
data.append('files[]', fs.createReadStream('/C:/Users/***/img.jpg'));
data.append('meta[folder]', '');

var config = {
  method: 'post',
  url: '**/api/cockpit/addAssets?token=**',
  headers: { 
    'Authorization': 'Bearer **',
  data : data

.then(function (response) {
.catch(function (error) {