Support » Plugin: WP REST API (WP API) » upload/send media file

Viewing 1 replies (of 1 total)
  • I don’t know where the plugin author has gone to. I’m online looking now at the GSoC Tracker and elsewhere to try and see if he’s still working on this project or whether it needs to be taken over by someone else.

    As far as your question, looking at the source, all you need to pass is the file, so posting the file to wp-json/media should get the file inserted into the uploads folder and listed in media attachments. As far as passing additional data, the code uses wp_read_image_metadata.

    So the title and description can be tied into the actual image file’s metadata, here’s his comment: // use image exif/iptc data for title and caption defaults if possible. If no title is passed that way, the title will be the name of the file.

    I have no idea how to attach this metadata to the file itself. There is some info on how to do it programatically here: , but if you are sending the file via the api, this is not what you want. If you figure out more, please post.

Viewing 1 replies (of 1 total)
  • The topic ‘upload/send media file’ is closed to new replies.