Here is a patch to show the attached filename and filesize on a preview. This is something that I've always wanted to have, so that I can check that I'm uploading the correct file to an issue.

CommentFileSizeAuthor
project_show_file.patch1.65 KBChrisKennedy

Comments

dww’s picture

Status: Needs review » Needs work

this is great. i hacked this in at one point, but apparently lost track of the workspace i did it in, and then forgot about it completely. ;) mostly, i love it.

1 tiny, minor gripe: the file size doesn't need to be check_plain()'ed via @, since format_size() can be trusted, so it only needs ! in there. haven't tested, but visually this looks RTBC other than ! vs. @. i'd just fix that myself and commit, but it's too late on a friday night for me to be operating CVS right now. ;)

dww’s picture

after more testing, this needs work for a more serious reason: it doesn't work right on the preview for the initial submission of a new issue. there, once you attach a file, a preview always looks like nothing was ever attached, but in the end, the attachment is showing up. (side note: looks like http://drupal.org/node/59039 is finally dead in 5.x-*, i thought it was still with us, but apparently it's now working properly, with or without this patch). so, if we're going to fix this UI problem, let's handle the initial issue submit case, too. thanks!

hunmonk’s picture

Version: 5.x-2.x-dev » 5.x-1.x-dev

file names are already shown as of 5.x-1.0, and the previews work on initial issue postings -- if somebody wants to roll a patch to add filesize to the current functionality, feel free... :)

in 5.x-2.x, my feeling is that we need to take this approach: http://drupal.org/node/179772

ChrisKennedy’s picture

Status: Needs work » Closed (won't fix)

This isn't needed any more now that real file attachments are used.