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 c0c01b4..3cbfbe8 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';
         }