Forums

Uploading Images And Attaching to Posts Via XML-RPC (4 posts)

  1. karpadiem
    Member
    Posted 7 months ago #

    Hello,
    Im sure this has a simple solution, but I have searched and searched and search and simply can not determine the answer.

    I have created a applescript program that uploads a video and a automatically generated thumbnail to my blog via ftp. It then uses XML-RPC to create a post and embed the video in the post.

    I have one snag though: I need the uploaded thumbnail to be "attached" to the post. My theme displays the first "attached" photo in the media library as a post's thumbnail.

    I have found how to upload photos via xml-rpc, but the solutions i have found seem to only upload and not attach to a particular post.

    and just to clarify, i do no want to embed the uploaded photo in the HTML post, just "attach it" like i would from the media library.

    Thanks for your help!

    ::EDIT::
    Thought this might help. I also have XML-RPC attaching two custom fields, video and video-thumb. Each have the URLs of their respective files.

  2. josephscott
    Member
    Posted 7 months ago #

    The current WordPress XML-RPC APIs don't have a way to associate an uploaded file with post. This is an area (media management) that the WP XML-RPC APIs need to expand and offer more. What's there right now is very minimal.

  3. karpadiem
    Member
    Posted 7 months ago #

    Thanks for your reply Joseph!

    I have written a custom plugin to handle the attaching. Thanks!

    It would be nice to see this in the WP XML-RPC API though. :)

    Thanks again!

    -Jake

  4. cyberhobo
    Member
    Posted 5 months ago #

    Jake, would you be willing to share your plugin? I was about to write the same thing. Thanks!

Reply

You must log in to post.

About this Topic