How to create a metadataschema which allowd only svg images?

Avatar

Avatar

pn_2007

Avatar

pn_2007

pn_2007

22-05-2020

I am looking to create a folder in DAM and impose restriction to it such that we can add only SVG images to it. Hence I am trying to create a metadataschema which allows only svg in images and planning to add  this as 'metadataSchema' property to my DAM folder so that this restriction is in place.

Can some one help me how I can create a metadataschema which will allow only svg as image?

We already have a metadataschema which allows jpeg and tiff. Can I create a copy of that? If so, what changes to make so that this allows only svg images?

 
 

 

Metadataschema

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

raghavc

Avatar

raghavc

raghavc

22-05-2020

metadataschema defines the layout for the page properties for the assets, I am doubtful it you can actually disallow a particular asset/file type to be allowed or restricted using this. But you can define the layout specific to an asset/file type if you need to capture any specific metadata info for it.

 

The only option , I can think is to create a folder metadata schema , to configure the supported file formats for the folder and customise the asset upload workflow to check if a specific file type can be uploaded or not.

 

Just curious to know, why would you want to restrict a specific file type to be uploaded to a folder, a well structured content folders and naming convention should be good enough to guide the content editor to place the assets in the correct folder.

Answers (2)

Answers (2)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

24-05-2020

Hi, I don't think so you can restrict this using a metadata profile or schema. This can be restricted using config but this is global https://techrevel.blog/2020/01/24/asset-upload-restrictions/

 

In your case, you can write a custom javascript and call on save/upload button. This Js will check the mime type and return false with an error message. The code can be executed based on a path.

 

 

Avatar

Avatar

pn_2007

Avatar

pn_2007

pn_2007

23-05-2020

@aemmarcCan you please advise on the steps? How can I restrict the dam folder using mime type?Is it simple like adding a property at dam folder jc:content?