How to create a metadataschema which allowd only svg images? | Community
Skip to main content
Level 3
May 22, 2020
Solved

How to create a metadataschema which allowd only svg images?

  • May 22, 2020
  • 3 replies
  • 6853 views

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?

 
 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by raghavc

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.

3 replies

raghavc
raghavcAccepted solution
Level 4
May 22, 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.

pn_2007Author
Level 3
May 23, 2020
This requirement is specific to one folder only. There is a component with some logos configured, business would like to upload only SVG images as logos. So we are planning to create a dedicated folder for SVG logos. So inside project dam folder, only one specific folder needs to be restricted to allow only SVG images. So don't think amending workflow will help here
pn_2007Author
Level 3
May 23, 2020

@aemmarc2Can 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?

arunpatidar
Community Advisor
Community Advisor
May 24, 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.

 

 

Arun Patidar