File upload title

This topic contains 2 reply and 3 voices, and was last updated by V 8 years, 11 months ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
November 7, 2013 at 4:31 pm 9830
V Hello there. I've been using this plugin for a while and it's been brilliant so far. One quick question that has recently come up though: When a user uploads a file such as a pdf or Word doc this just appears as a blank white box. So when they have uploaded several files there is no way to tell which file is which. With the image uploads it is easy as you can see the image thumbnail, but with a text document there is obviously no thumbnail. So is there any way to get the file name to appear next to the uploaded file? many thanks D
November 12, 2013 at 12:31 am 9967
Tareq Hasan Tareq Hasan

Hello D, sorry didn’t notice this thread.

You’ve a valid point here as you can’t see the file name, it’s difficult to get the file name. Although you could hover over the image and see the file name.

You could add the file name by editing /class/uploads.php in line 117 which shows like this:
[php]$html .= sprintf( ‘<div class="attachment-name"><img src="%s" alt="%s" /></div>’, $image, esc_attr( $attachment->post_title ) );[/php]

Replace this with this:
[php]$html .= sprintf( ‘<div class="attachment-name"><img src="%1$s" alt="%2$s" /> %2$s</div>’, $image, esc_attr( $attachment->post_title ) );[/php]

May 28, 2015 at 6:44 am 45405
V V

Hello,

I would also like to display the file name when a user uplaods a file. But I would rather do it another way:

Please can you tell us how we can bind a function to a plupload event?

This will be very useful for other things too.

Thanks

Viewing 2 Posts - 1 through 2 (of 2 total)