Uploading Files to Plasmic CMS trough API

I wondered if its possible to create an entry and upload files to an existing model in the Plasmic CMS with a “File” field. I tried it with this fetch:

await fetch(
https://data.plasmic.app/api/v1/cms/databases/${process.env.PLASMIC_CMS_ID}/tables/${modelId}/rows?publish=1,
{
method: “POST”,
headers: {
// Your CMS ID and CMS Secret API token
“x-plasmic-api-cms-tokens”: ${process.env.PLASMIC_CMS_ID}:${process.env.PLASMIC_CMS_SECRET_KEY},
“content-type”: “application/json”,
},
body: JSON.stringify({
rows: [
{
data: {
name: “Mustermann”,
comment: “Test 123”,
profilePicture: {
url: data:image/png;base64,${imageBase64},
name: “hero_image.png”,
size: 0,
mimetype: “image/png”,
},
},
},
],
}),
}
);

I also tried some variations for the profilePicture field, but all of them seem to get ignored. The new content gets created but the profilPicture field is still empty and in its default state. Is uploading Files even supported right now?

Hi @osman_deveci

Welcome to Plasmic community!

Unfortunately, file uploads are not supported in the API yet. We will review it internally to support it in the near future.