Image Url not accepted by CMS Api

Hi

I am attempting to upload an image to Webflow via the CMS Api. The collection item field is of type Image and the image is stored in Salesforce but referenced by a url.

The following url is an example of a url that is not accepted/processed by the CMS Api.

https://syndex--qa--c.documentforce.com/sfc/dist/version/download/?oid=00D0k0000001V0M&ids=0680k000001QVQP&d=%2Fa%2F0k0000000ehb%2FrgjWFDHoTmJueiM8_2RdtCkcmxJpCaefBWhGDPUd0gs&asPdf=false

All other fields in the payload are accepted and reflected in the collection item. Other image urls are accepted by Webflow. For some reason Webflow does not like this Url even though it resolves to an image.

Is anyone aware why Webflow CMS Api is not be accepting this url?

Thanks


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey!

I’m pretty sure it will need to be a direct file link. As this downloads the file on when visited, there’s ether some serverside or JS happening to achieve that, so it won’t work with the API.

Your URL will need to not be one that auto-downloads the image.

Hi Jono,

Thanks for the reply. That makes sense to me.

When I open up my terminal and run curl on that first image, I get a 403 access denied error. That’s why the API can’t upload it to Webflow.

curl -I https://webflowcmsimages.nyc3.digitaloceanspaces.com/square-invoice-template-copy.jpg
HTTP/2 403 
content-length: 232
x-amz-request-id: tx0000000000001393a7db5-0062d81ab1-319bec8f-nyc3c
accept-ranges: bytes
content-type: application/xml
date: Wed, 20 Jul 2022 15:09:37 GMT
vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
cache-control: max-age=60
strict-transport-security: max-age=15552000; includeSubDomains; preload

I have the same problem with an image, but it should be accesible.
However this image does not show in the browser but always forces a ‘download’.
the image i’m working with: https://recruitee-main.s3.eu-central-1.amazonaws.com/offers/1265652/normal_sharing_gk7vcdccovt1.jpg

I’ve learned that there are custom settings possible, in HTTP Response headers.
It seems for me, that the image we’re trying to upload does likely not have the default settings.

Content-Disposition
default is inline
but when this is changed to attachment, the problem of not importing the image into Webflow may arise.

Content-Type
It can also be the Content-Type, which for images should be image/jpeg or image/png but it can also be set to binary/octet-stream, which will generally causes the browser to download the file

In my case, i found that the Content-Type was set to application/octet-stream.
This prevents the API call to import the image to the Webflow collection (and will leave it empty).

Read more on HTTP response headers here: google chrome - Why do some images automatically download when their URL is visited and others not? - Stack Overflow

Hi,

I have a similar question to the above; i am trying to use this link to upload my image through webflow api in a collaction:

Other public links seem to work only this link is giving problems. This specific URL is coming from a CRM we are trying to make a connection for and by changing the the extension .webp to .png like this (changed .webp to /.png):

The image is uploaded in the collection

I have a feeling this might be related to the content-type as well, is there anyway for me to confirm this?

I am not able to change the url, but would like use .webp for performances is there any other way how i could make this work?

i encounter the same problem with .jpg formats, like this:

this image gives the following response headers: