* media: image data
+#### Return values
+
+Object of:
+
+* media_id: a media identifier (integer)
+* media_id_string: a media identifier (string)
+* size: size in byte
+* image.w: image width
+* image.h: image height
+* image.image_type: image mime type
+* image.friendica_preview_url: image preview url
+
---
### oauth/request_token (*)
$ret = $data;
break;
}
-
return $ret;
}
$returndata["image"] = ["w" => $media["width"],
"h" => $media["height"],
"image_type" => $media["type"],
- "preview" => $media["preview"]];
+ "friendica_preview_url" => $media["preview"]];
Logger::log("Media uploaded: " . print_r($returndata, true), Logger::DEBUG);
$notes = $xmlnotes;
}
-
return api_format_data("notes", $type, ['note' => $notes]);
}
$this->assertEquals('image/png', $result['media']['image']['image_type']);
$this->assertEquals(1, $result['media']['image']['w']);
$this->assertEquals(1, $result['media']['image']['h']);
+ $this->assertNotEmpty($result['media']['image']['friendica_preview_url']);
}
/**