lleppert
New Creator

Where is the detect Images as Files option in the First Spirit API ?

Jump to solution

Hello everyone,

I'm trying to find the detect images as files option which is located within the Server Manager. However, I'm having trouble navigating the API documentation to locate the relevant functions or methods for this task.

could you please help me on how to find the right interfaces in the API ?

 Thank you in advance for your help!

Best regards,

lleppert 

0 Kudos
1 Solution

Accepted Solutions

There is an existing agent called "MediaConstraintsAgent" with a method "setFileExtensions". However, that agent is currently not part of the stable API and may change without notice.

If you require stable API for this use case, please open a support ticket describing your use case.

View solution in original post

5 Replies
Windmüller
Crownpeak employee

I am not quite sure which ServerManager option you are referring to. The API provides the method Media#getType, does that help?

0 Kudos

In the Edit Project Menu you find the Compatibility option, and within, the final option is Detect Images as a File. 

and i want to change this using the API 

Hope that helps 😄

0 Kudos

There is an existing agent called "MediaConstraintsAgent" with a method "setFileExtensions". However, that agent is currently not part of the stable API and may change without notice.

If you require stable API for this use case, please open a support ticket describing your use case.

lleppert
New Creator

Thank you @Windmüller it works now 😄

0 Kudos

You are welcome.

But please take my advise seriously: If your code is used in a productive environment, it should use the stable API only. Otherwise an update of FirstSpirit may break your code.