API to upload & delete media files

Hi - does Prismic have an API to upload media files? ( pref REST )

We have the need to upload, replace & delete document files for front-end access.
Front-end will query media files & use private notes to generate display / download tables.
We are not ( currently ) able to provide a source URL for Prismic to upload the document, we need to provide as payload.

Thanks and I look forward to hearing back from you.

Hi there,

Thanks for reaching out,

Currenty Prismic doesn't offer a REST write API to import media files in bulk.

But you can use the Import/Export feature to achieve that; you can check this article for more details.

Hi,

we are currently looking into whether the primisc CMS is an option for us.

In doing so, we have stumbled upon an issue that has the potential to be a show stopper.
It is about the integration of our EPR and the CDN/Media library.

Current Integration:
All product images are currently located at the Cloudinary CDN in a dedicated folder like /product/sku/ .
The ERP always searches for the SKU in the /product folder via Cloudinary API and imports all hits/links. By having the ERP only search in the /products/ folder, it is ensured that the ERP really only imports links to product images and not links to content images etc.

Question:

How can we import all product image links from the prismic CDN / Media Library in an automated way and assign the image links to the correct SKU in the ERP in an automated way? What possibilities do you see in connection with prismic? Is there an API available?

Thanks a lot

Best

Alexander

Newbie Gatsby developer question here. Thanks in advance for replying or giving ideas.

Is there a way for me to get the total number of images in Media Library along with image file size through an API or access the database?

Hey Charlotte,

Welcome to the community!

Unfortunately, there's no media API that exists at the minute, but it is being tracked as a feature request here.

Thanks.

Thanks for the reply Phil.

I was thinking as an alternative to get these data through graphQL but I still cannot access the file size of image. I've also seen options to use Import/Export then I can also figure out a way to find the fields I need.

The main issue is that we are getting build errors because some of the images in our media library is over 10MB.

If you have other alternative suggestions, that would be awesome. Thanks again.