Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Some kind of thumbnail for file field #52

kieranbarnes opened this Issue Sep 19, 2011 · 3 comments


None yet
3 participants

When using the the file field its not obvious if the field already has a value when editing the page.
There is a box for a thumbnail (like the 'image' field) but is empty regardless of whether the field has a value set.

Perhaps display the file path or a WP Media style icon in the box to show if the field has a value.

mmott commented Jan 9, 2012

temporary solution

adding this line:
$out .= sprintf('filename: <a href="%s" target="_blank" class="mf-file-view" >%s</a>',MF_FILES_URL.$field['input_value'],$field['input_value']);
as line 43 in magic-fields-2/field_types/file_field/file_field.php behind
$out = '<div class="image_layout">';
does show the file name for the uploaded file with a link to that file (same link as the view link below the (empty) file thumbnail)

I did something very similar.

    if (preg_match('/videos_high_resolution_mp4_video|video_high_resolution_mp4_video/',$field['name'])) {
        $out .= 'WP Video ID: '.$field['input_value'];

hunk commented Aug 27, 2016

I'm cleaning the issues if you still have this problem reopen the issue. thanks

@hunk hunk closed this Aug 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment