Aaron Parecki
7 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
1 changed files with
7 additions and
3 deletions
-
lib/helpers.php
|
@ -123,9 +123,13 @@ function micropub_post($endpoint, $params, $access_token, $file = NULL, $json = |
|
|
curl_setopt($ch, CURLOPT_URL, $endpoint); |
|
|
curl_setopt($ch, CURLOPT_URL, $endpoint); |
|
|
curl_setopt($ch, CURLOPT_POST, true); |
|
|
curl_setopt($ch, CURLOPT_POST, true); |
|
|
|
|
|
|
|
|
|
|
|
if($file) { |
|
|
$file_path = $file['tmp_name']; |
|
|
$file_path = $file['tmp_name']; |
|
|
$file_content = file_get_contents($file_path) . self::EOL; |
|
|
|
|
|
|
|
|
$file_content = file_get_contents($file_path); |
|
|
$filename = $file['name']; |
|
|
$filename = $file['name']; |
|
|
|
|
|
} else { |
|
|
|
|
|
$file_path = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Send the access token in both the header and post body to support more clients
|
|
|
// Send the access token in both the header and post body to support more clients
|
|
|
// https://github.com/aaronpk/Quill/issues/4
|
|
|
// https://github.com/aaronpk/Quill/issues/4
|
|
|