If you store multiple file (media) formats in your asset library then you may want users to be able to quickly search by their type.
Here‘s how to set up a dropdown list containing the 'file formats' you want (such as ‘Images‘, ‘Video‘, 'Documents', 'Audio' etc.) and have the dropdown automatically populated for new assets based on their file extension:
Step 1: Go to Admin > Attributes and click ‘Add a new attribute‘.
Step 2: Create the new attribute as type ‘Dropdown‘ and call it 'File Format‘ (or whatever you want). Click 'Searchable' to include in 'Keyword Searches'. Then click save.
Step 3: Now click on the [edit list values] link for this new attribute. Here you add the values that will be displayed in the drop down list. You can either add a value in for all your file extensions (e.g. jpg, etc.), or you can add in more general terms such as 'image' (and have this chosen for all image formats - e.g. jpg, tif, gif).
For example you could add values for the dropdown, such as ‘Image‘, 'Video', 'Audio', 'Video', 'Document'. For each, enter a value for the field 'Embedded data mapping value' to define the set of file extensions - these should be separated by the 'pipe' character | (for OR) - this appears above the backslash character on the bottom left of standard keyboards. For example, you could add the following values (this list shows Name:Embedded data mapping value):
- Image: png|jpg|tif|tiff|eps|psd|ai|bmp|gif|raw|img|psp|indd
- Document: doc|docx|xls|xlsx|ppt|pptx|txt|pdf|odt|sxw|rtf|tex|wpd|wp|wp7
Step 4: Go to Admin > Attributes and click the tab 'Display Attributes' to ensure that the attribute is visible dependant on the action the user is making. Select the action that you wish to add the attribute to and on the right-hand side of the screen you will see the option 'Add an attribute to display' with a dropdown menu. Select your new attribute and click 'Add'.
Recommended 'Display Attributes' are: 'View' and 'Searching > Advanced search' , it may also be helpful to add to 'Searching > Search bar' to enable it to be selectable on quick search.
Step 5: Go to Admin > Attributes > ‘Embedded Data Mappings‘ (tab). Create a new mapping as follows:
Attribute: pick the new attribute you have created for this purpose
Embedded data type: [other]
Embedded data value: Filename Extension
Mapping direction: Upload
Delimiter: leave blank
Binary data: leave blank
Then click 'Add'
Step 6: Finally, go back to the attribute page, edit the new File Format attribute and set the Default Value to 'Other'. This ensures you have a catch all for files that you upload that do not have a file extension that matches the ones in the list above. E.g. a Zip file. When you upload a fie, this will be set unless the extension is recognised, at which point it will set the appropriate file type.
Once complete, to see it working complete a single upload and you should see the appropriate value selected during the upload process.
To retrospectively extract values for existing assets in your system you will have to go to:
Admin > Attributes > ‘Embedded Data Mappings‘ (tab), and click on 'rerun metadata extraction for existing assets'.