This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# 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-deploy.sh wpe-remote-name bedrock-folder | |
# | |
# Place this file at the same level as your trellis and bedrock-folder | |
# | |
# Version: 2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="file" id="file"/> | |
----- | |
var file = $('#file')[0].files[0]; | |
$.ajax({ | |
method: "POST", | |
url: REST_API_URL + 'wp/v2/media', | |
data: file, |