<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> This example database contains some file attachments. The Meta formula property displays information about each file, including its media type and hosting location (within Notion or hosted externally).
Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter
</aside>
// Compressed
if(contains(prop("File"),"jpg") or contains(prop("File"),"png") or contains(prop("File"),"gif") or contains(prop("File"),"jpeg"),"🌅 Image",if(contains(prop("File"),"mp3") or contains(prop("File"),"wav") or contains(prop("File"),"aiff"),"🎧 Audio","📝 Text")) + "\\n" + if(contains(prop("File"),"secure.notion-static.com"),"✅ Internal","⛔️ Externally Hosted")
// Expanded
if(
contains(
prop("File"),
"jpg"
) or contains(
prop("File"),
"png"
) or contains(
prop("File"),
"gif"
) or contains(
prop("File"),
"jpeg"
),
"🌅 Image",
if(
contains(
prop("File"),
"mp3"
) or contains(
prop("File"),
"wav"
) or contains(
prop("File"),
"aiff"
),
"🎧 Audio",
"📝 Text"
)
) +
"\\n" +
if(
contains(
prop("File"),
"secure.notion-static.com"
),
"✅ Internal",
"⛔️ Externally Hosted"
)