Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 604 Bytes

extractor.md

File metadata and controls

25 lines (17 loc) · 604 Bytes

#emsco_asset_meta

This filter returns you a ExtractedData object from an asset's hash:

{% set meta = source.file.sha1|emsco_asset_meta %}
{{ meta.locale }}

You can also specify a filename and bypass the 3MB protection:

{% set meta = source.file.sha1|emsco_asset_meta('raport.pdf', true) %}
{{ meta.locale }}

#emsco_guess_locale

This filter returns you a text's locale guessed by Tika:

{{ 'Hello comment allez-vous?'|emsco_guess_locale }}
{# Displays a 'fr' #}