Support multipart/form-data content type
authorChristian Weiske <cweiske@cweiske.de>
Thu, 19 Apr 2018 19:02:06 +0000 (21:02 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 19 Apr 2018 19:02:06 +0000 (21:02 +0200)
Resolves: https://github.com/cweiske/anoweco/issues/6

www/micropub.php

index c0c01b4c4864ab5e3ce595cb9da4a428e81c276a..3cbfbe87da22524bbc093f7b18edc18386d7fc55 100644 (file)
@@ -177,7 +177,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'GET') {
     }
     list($ctype) = explode(';', $_SERVER['CONTENT_TYPE'], 2);
     $ctype = trim($ctype);
-    if ($ctype == 'application/x-www-form-urlencoded') {
+    if ($ctype == 'application/x-www-form-urlencoded'
+        || $ctype == 'multipart/form-data'
+    ) {
         if (!isset($_POST['action'])) {
             $_POST['action'] = 'create';
         }