WordPress.org

Ready to get started?Download WordPress

Forums

Editing description of uploaded files (14 posts)

  1. Timelord
    Member
    Posted 8 years ago #

    Hi,

    Just upgraded to version 2.0 and I'm loving it! But there's something that I just can't find. It's probably something obvious that I'm just missing, but how do I edit the description of a file I've uploaded? When I upload it, it asks me for a description, so surely there must be a way to go back and modify this or the name of the file or anything like that. How can I do that?

    Thanks!

  2. Kafkaesqui

    Posted 8 years ago #

    Psst!

    Not exactly a well known feature (and there really should be a way to easily edit file titles/descriptions), but if you know the ID provided to the upload (i.e. "attachment"), you can pass it as part of a post edit query:

    /wp-admin/post.php?action=edit&post=1000

    This is where 1000 is the assigned ID for an attachment. If you don't know the ID (and who would?!), by selecting the uploaded file under Browse or Browse All and hovering over the Delete option (but don't select it!), most browsers should show the url in the status area (usually bottom of the browser window). Just look for the value of &attachment= in that url.

    It will display in the regular post editor. Just for the sake of clarity: Title = Title, Post = Description.

  3. Timelord
    Member
    Posted 8 years ago #

    Kafkaesqui, thank you so much. I figured at the very least there would be something like that. I really appreciate the assistance. :)

  4. joshyoungmusic
    Member
    Posted 8 years ago #

    Kafkaesqui, I tried what you suggested because I'm wanting to edit the description also, but I couldn't get it to work. For example, say my attachment=3, I go to

    /wp-admin/post.php?action=edit&post=3

    but it brings up the write post page with the file page in the preview, but with three lines of errors stating that it can't find the file "edit-attachment-form.php". I looked around, and I can't find it anywhere either.

    Any suggestions (from anyone)? I really appreciate your help!

  5. Kafkaesqui

    Posted 8 years ago #

    No idea why that error is coming up, but try the following:

    In wp-admin/ make a copy of edit-form-advanced.php. Name the copy edit-attachment-form.php.

  6. joshyoungmusic
    Member
    Posted 8 years ago #

    I did what you suggested, and the form came up as it should have (at least it appeared to), so I edited the information. But now, it took that and put it as a new post on my page and totally dissociated itself with the uploaded file. It doesn't even show anywhere that the file exists anymore, even though it's still in the same upload folder.

    I'm boggled!

    Thanks.

  7. Kafkaesqui

    Posted 8 years ago #

    joshyoungmusic, I can't duplicate this problem (including the demand for edit-attachment-form.php). What's the exact version of WordPress you're using?

  8. joshyoungmusic
    Member
    Posted 8 years ago #

    I'm using 2.0, and I even downloaded their latest zip file, and it doesn't have the edit-attachment-form.php in it (although the reference may be the problem and not the file itself).

  9. Kafkaesqui

    Posted 8 years ago #

    You could try editing out the reference to it in post.php. You just need to remove these two lines:

    elseif ($post->post_status == 'attachment')
    include('edit-attachment-form.php');

    Important source editing note: backup files before editing them.

  10. joshyoungmusic
    Member
    Posted 8 years ago #

    That worked great. I just commented those lines out, and it skipped right to edit-form-advanced.php. I figured out what I did wrong. I hit "Publish" instead of hitting "Save," so it published it as a post on my page instead of editing the uploaded file info.

    Thanks again for all of your help!!!

    Just curious, any idea why it's calling the edit-attachment-form.php file when it doesn't even exist?

  11. joshyoungmusic
    Member
    Posted 8 years ago #

    Ah, found another problem. When you do it that way and you have the file "linked to page" and click on the link, when it takes you to the page for the file, the link line at the top of the page (on the default theme at least) where it has the [post name] >> [file/photo name], it changed it to be [file/photo name] >> [file/photo name]. You can no longer get back to the original post without hitting the back button. You can, however, delete that reference and reinsert it in to the post, and it works fine, but that seems odd.

  12. joshyoungmusic
    Member
    Posted 8 years ago #

    Sorry to post three times in a row, but I just found that if you edit the original post and resave it (without even doing anything), then it "fixes" itself, and it displays correctly. I've done this four times now, and it does the same thing every time.

  13. Kafkaesqui

    Posted 8 years ago #

    "Just curious, any idea why it's calling the edit-attachment-form.php file when it doesn't even exist?"

    Assumedly just one of the developers planning for something which was never implemented. Glad you got things to work.

  14. joshyoungmusic
    Member
    Posted 8 years ago #

    Thanks for all of your help. I really appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Topic