How to add custom fields to files

Thanx! But it is not working for me, because Im trying to get file text in a bit different approach.

I am trying to add file textfield with other image data (like height, width etc), You can see in this example: http://forum.getkirby.com/t/export-all-site-content-as-json/264