Make Twitter Media upload API v1.1 reach us

Now we just have to accept the 'media' or 'media_data' (base64 encoded)
POST arguments instead of $_FILES uploads.
This commit is contained in:
Mikael Nordfeldth
2016-01-14 18:29:21 +01:00
parent 6e49281adb
commit 0caf0612d0
4 changed files with 83 additions and 15 deletions

View File

@@ -179,8 +179,8 @@ class OembedPlugin extends Plugin
return true;
}
foreach (array('mimetype', 'url', 'title', 'modified') as $key) {
if (!empty($oembed->{$key})) {
foreach (array('mimetype', 'url', 'title', 'modified', 'width', 'height') as $key) {
if (isset($oembed->{$key}) && !empty($oembed->{$key})) {
$enclosure->{$key} = $oembed->{$key};
}
}