Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block jamiechong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Modifed to work with bedrock. Note the hardcoded theme (search for my-theme-name), which could probably be changed to use
# a command line argument.
# Usage:
# ./ wpe-remote-name bedrock-folder
# Place this file at the same level as your trellis and bedrock-folder
# Version: 2.1
jamiechong / gist:ed2b569fb879015f66c33eb2cbe6576d
Created Jul 20, 2017
Ajax upload file to Wordpress REST API v2 media endpoint
View gist:ed2b569fb879015f66c33eb2cbe6576d
<input type="file" id="file"/>
var file = $('#file')[0].files[0];
method: "POST",
url: REST_API_URL + 'wp/v2/media',
data: file,
You can’t perform that action at this time.