Failed to create collection item - Unsupported file type

I’ve set up a simple API integreation which is meant to “create live items” on a collection with a set of values.

For example, this collection is blog posts and each item has two require props:

name (single line text)

blog_post_body (rich text field)

The weird issue im now having, is that for some of the API calls it works, and for others it doesnt, all apparently related to URLs I provided for the elements I submit in the API call.

The error I’m getting on the attempted creation is: Unsupported file type: application/xml; charset=UTF-8
In other cases where it works, I successfully get the item id (and can confirm on the webflow + website it works)

For example, this will work (for the blog_post_body param):

HELLO WORLD

But this wont work:

HELLO WORLD

The only thing i changed was the image source URL, and so it does indeed look to be impacting it. I’m just not sure what’s wrong with my hosted image (i also tried cloudflare, not only gcp/firebase).

This is the API endpoint im using on Webflow btw - Create Collection Item (Live)

Anyhow… error is super weird and no info on this on the doc… so came to the reddit angels and hoping for your help.

Thank you!

Taking a look, do you mind sharing the request payload you’re sending directly?

Yes, here:

{
  "isArchived": false,
  "isDraft": false,
  "fieldData": {
    "name": "Exploring the Connection Between Love, Life, and Health 5",
    "slug": undefined,
    "description": "Discover the intricate connection between love, life, and health, and how nurturing these aspects can lead to a fulfilling existence.",
    "main-image": {
      "url": "https://v5.airtableusercontent.com/v3/u/28/28/1714478400000/rcWkWi_lCCBXW2exo6iHNQ/mtB1oylIU-2pvJtS4yfNJf4NV05pZu95XvPFiEBnCSKtRbu-a3qbnz0SjkQJ_GFy0y9vszVsA9FgPtaU9inIY9MraJk3HN4Np1EcYXem4kgVOGt9F9ycP4hkMPtu_p1kyUixjSXlZoS0h2zNFm6wa3uFKuzXlyltXmVZ8nbhoCkwNKTm8qzodvuanZzBvj6nsL8RiGKspF-gdgCvBUesYw/hcjIKAm-L0AW0drXBK2zevNWMB-jrvQqG6FUVviDc9U"
    },
    "thumbnail-image": {
      "url": "https://v5.airtableusercontent.com/v3/u/28/28/1714478400000/kjiqc_HsBiz1C9qtcC3kZA/9uDVfd5dP2GtondIuP0fU2D11azMoR7rvK9XR_BzpvmVboksx5HOtS7UFPzv__qb-P_8LDXIFt0_zh60ZHWRmU3FQJOh53dlbVztzldHoJdx5xVJaDfpF_w9yFJW6M7NttqKYkFqHCx-C2CBMoiXzF-6KYex9FN2319w2TXYSKV9kyH9C5NJp-sgTdLq2OJt53iOTz_-ZyjqzSmMe0M22w/sfK2LvLNBXR87PZtHF0RXRpjk8apGQAocTKrWlOqidg"
    },
    "post-body": "<h1>3 Secrets of Creating Great Short-Form Videos</h1>\n" +
      "&nbsp;&nbsp;&nbsp;&nbsp;<p>Short-form videos have taken the digital world by storm, becoming a cornerstone of content strategy for brands, influencers, and content creators alike. With platforms like TikTok, Instagram Reels, and YouTube Shorts leading the way, the ability to create captivating and engaging short videos is more valuable than ever. In this blog post, we'll dive into the 3 secrets of creating great short-form videos that can help you stand out and connect with your audience.</p>\n" +
      '&nbsp;&nbsp;&nbsp;&nbsp;\n' +
      '&nbsp;&nbsp;&nbsp;&nbsp;<h2>The Power of Storytelling</h2>\n' +
      '&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://firebasestorage.googleapis.com/v0/b/supercreator-ai-staging.appspot.com/o/blogpostimages%2F1714468291324_1714468287342.png?alt=media&token=e7acc881-7576-49f5-9fbb-d5c1014388ac>\n'
  }
}

The error seems to be related to the img src, in this case: https://firebasestorage.googleapis.com/v0/b/supercreator-ai-staging.appspot.com/o/blogpostimages%2F1714468291324_1714468287342.png?alt=media&token=e7acc881-7576-49f5-9fbb-d5c1014388ac

The source is a public URL, and so why im not sure why webflow recognized it as not.

Your assistance would be greatly appreciated @dmitrypimenov

i’ve been digging deeper and some more info/results…

This image will work:

This wont:

Both are hosted on same storage (google firebase). I am able to create new collection items when using the first image within an tag, but not the second one (which is what i need).

Any ideas?

@dmitrypimenov Super annoying, but I was able to finally figure it out…

The issue was that apparently webflow doesn’t like when you have underscores aka _ in your file name when uploaded… this is what caused the problems.

Once i updated the names/naming conventions of the image files i was saving, this issue was solved.

In future, would be great if webflow would highlight this somewhere…

Hey @royherma - do you mind sending an updated payload for us to try to reproduce? Perhaps a working payload with another non-working payload would help. We noticed that the <img> tag in your post-body field had a missing ending " before closing out the tag, so we want to make sure we’re reproducing what you’re seeing on your end.

Regarding the underscore character, we do have images that utilize this character in some img URL’s so I’m not sure this might be the entire reason, but would be good to validate against an updated payload when you get a chance just to make sure! We definitely want to get to the root cause here and surface any gotchas in our docs.