def METHOD_NAME(registry=None):
    if registry is None:
        registry = getUtility(IRegistry)
    upload_fields = registry.get('castle.file_upload_fields', None)
    if upload_fields is None:
        # not updated yet, b/w compatiable
        required_upload_fields = registry.get(
            'castle.required_file_upload_fields', []) or []
        result = [{
            'name': 'title',
            'label': 'Title',
            'widget': 'text',
            'required': 'title' in required_upload_fields,
            'for-file-types': '*'
        }, {
            'name': 'description',
            'label': 'Summary',
            'widget': 'textarea',
            'required': 'description' in required_upload_fields,
            'for-file-types': '*'
        }, {
            'name': 'tags',
            'label': 'Tags',
            'widget': 'tags',
            'required': 'tags' in required_upload_fields,
            'for-file-types': '*'
        }, {
            'name': 'youtube_url',
            'label': 'Youtube URL',
            'widget': 'text',
            'required': 'youtube_url' in required_upload_fields,
            'for-file-types': 'video'
        }]
    else:
        result = []
        for field in upload_fields:
            if 'name' not in field:
                continue
            # need to make copy of data otherwise we're potentially
            # modifying the record directly
            data = {}
            data.update(field)
            # make sure all required field are in place
            if data.get('required'):
                data['required'] = str(data['required']).lower() in ('true', 't', '1')
            else:
                data['required'] = False
            if 'label' not in data:
                data[u'label'] = data[u'name'].capitalize()
            if 'widget' not in field:
                data[u'widget'] = u'text'
            if 'for-file-types' not in data:
                data[u'for-file-types'] = u'*'
            result.append(data)
    return result