{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2026-12-02T12:05:45Z","object_id":{"id":2034,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_media_exif","title":"mod_media_exif","uri":"https:\/\/zotonic.com\/id\/2034"},"seq":1}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"subject":{"objects":[{"created":"2026-12-02T12:05:45Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2569,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_metadata","title":"Metadata","uri":"https:\/\/zotonic.com\/id\/2569"},"seq":3},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2576,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_media_management","title":"Media management","uri":"https:\/\/zotonic.com\/id\/2576"},"seq":4},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2603,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_configuration","title":"Configuration","uri":"https:\/\/zotonic.com\/id\/2603"},"seq":5},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":6},{"created":"2026-12-02T12:05:45Z","object_id":{"id":2686,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_privacy","title":"Privacy","uri":"https:\/\/zotonic.com\/id\/2686"},"seq":7}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"export_revision":26,"id":3202,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3202"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_media_privacy","page_url":{"en":"https:\/\/zotonic.com\/docs\/3202\/media_privacy","x-default":"https:\/\/zotonic.com\/docs\/3202\/media_privacy"},"preview_url":null,"resource":{"version":10,"pivot_location_lat":null,"title":"media_privacy","is_authoritative":true,"body":"<p>Read and save the site&#39;s uploaded media privacy policy. Administrators can\nconfigure this policy under Configuration &gt; Privacy &gt; Uploaded media.<\/p>\n<p>Read the validated settings map in a template:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% with m.media_privacy.settings as policy %}\n    {% if policy.strip %}Metadata stripping is enabled.{% endif %}\n{% endwith %}\n<\/code><\/pre>\n<p>The <code>settings<\/code> model path requires an editable administrator context, returning\n<code>{error, eacces}<\/code> otherwise. Unknown paths return <code>{error, unknown_path}<\/code>. This\nmodel has no write path; the administration form calls the Erlang API.<\/p>\n<p>Settings use binary keys:<\/p>\n<table class=\"table\"><thead><tr><th>Key<\/th><th>Values<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td><code>strip<\/code><\/td><td>Boolean; strip embedded metadata from supported uploads<\/td><td><code>false<\/code><\/td><\/tr><tr><td><code>retain<\/code><\/td><td><code>all<\/code>, <code>selected<\/code>, <code>none<\/code><\/td><td><code>all<\/code><\/td><\/tr><tr><td><code>fields<\/code><\/td><td>List of selected metadata groups<\/td><td><code>title<\/code>, <code>description<\/code>, <code>copyright<\/code>, <code>focus_point<\/code><\/td><\/tr><tr><td><code>location<\/code><\/td><td><code>exact<\/code>, <code>rounded<\/code>, <code>remove<\/code><\/td><td><code>exact<\/code><\/td><\/tr><tr><td><code>precision<\/code><\/td><td>Decimal places for rounded coordinates, from 0 to 6<\/td><td><code>3<\/code><\/td><\/tr><tr><td><code>import_title<\/code>, <code>import_summary<\/code>, <code>import_body<\/code><\/td><td>Boolean; import into empty resource fields<\/td><td><code>true<\/code><\/td><\/tr><\/tbody><\/table>\n<p>Selectable groups are <code>title<\/code>, <code>description<\/code>, <code>creator<\/code>, <code>copyright<\/code>,\n<code>capture_date<\/code>, <code>camera<\/code>, <code>location<\/code>, <code>focus_point<\/code>, <code>keywords<\/code>, <code>credit_source<\/code>,\nand <code>license<\/code>. Keywords retain the complete keyword list. Credit\/source keeps\ncredit text, source text and source URL; license keeps the license identifier or\nURL, usage terms and rights-statement URL. With <code>mod_copyright<\/code> enabled, retained\ncredit\/source and recognized licenses populate its properties on new media resources.\nFocus point retention\nkeeps the EXIF subject area and the derived point used for cropping. Camera\nretention includes make\/model, lens information, focal length, aperture, shutter\nspeed, ISO, metering, flash and related exposure settings; serial numbers and\nunique image identifiers are excluded. Retained location coordinates supply the\ncreated media resource&#39;s GPS location unless editorial coordinates are supplied.\nRetention controls stored metadata;\nremoving metadata from the uploaded file also requires <code>strip<\/code>. See\n<code>mod_media_exif<\/code> for supported formats and stripping behavior.<\/p>\n<p>From Erlang, <code>policy(Context)<\/code> returns <code>{ok, Settings}<\/code> or\n<code>{error, metadata_privacy_config}<\/code>. It supplies defaults when configuration is\nabsent. This is an internal upload-policy read and does not check ACLs.<\/p>\n<p><code>save(Settings, Context)<\/code> requires an editable administrator context, validates\nthe supplied map, fills omitted keys with defaults, and stores the complete\npolicy atomically as JSON in <code>mod_media_exif.metadata_privacy<\/code>. It returns <code>ok<\/code>,\n<code>{error, eacces}<\/code>, or a validation\/storage error. To change one setting while\npreserving the others, read the current policy first:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{ok, Settings} = m_media_privacy:policy(Context),\nm_media_privacy:save(Settings#{&lt;&lt;&quot;precision&quot;&gt;&gt; =&gt; 2}, Context).\n<\/code><\/pre>\n<p><code>from_form(Qs)<\/code> parses the administration form&#39;s binary-keyed proplist and\nreturns <code>{ok, Settings}<\/code> or <code>{error, metadata_privacy_config}<\/code>. It neither saves\nsettings nor checks permissions; the caller must use <code>save\/2<\/code> to persist them.<\/p>","slug":"media_privacy","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"ecf3c31c0f5c84bfd1cc2c7558f40bbd6b7950d4ff281162be2b00628b5ccd4f","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":"apps\/zotonic_mod_media_exif\/src\/models\/m_media_privacy.erl","publication_start":"2026-12-02T12:05:45Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_media_exif\/src\/models\/m_media_privacy.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_media_privacy","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-12-02T12:05:45Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_media_exif","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"f5d9083cd1c05bfff847bc9040b9d2092445082b\n","erlang_module":"m_media_privacy","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-12-03T15:23:48Z","title_slug":"media_privacy"},"uri":"https:\/\/zotonic.com\/id\/3202","uri_template":"https:\/\/zotonic.com\/id\/:id","version":26,"websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3202"}},"status":"ok"}