Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure 逻辑应用程序http post多部分/formdata在映像上失败并被禁止_Azure_Azure Logic Apps - Fatal编程技术网

Azure 逻辑应用程序http post多部分/formdata在映像上失败并被禁止

Azure 逻辑应用程序http post多部分/formdata在映像上失败并被禁止,azure,azure-logic-apps,Azure,Azure Logic Apps,希望这里有人能帮我 我正在尝试通过HTTP post将图像发布到我的API。当我使用以下代码发布时: --TestLine Content-Disposition: form-data; name="Description" test.txt --TestLine Content-Disposition: form-data; name="ExternalDocumentType" ATTACH_DD --TestLine Content-Dispos

希望这里有人能帮我

我正在尝试通过HTTP post将图像发布到我的API。当我使用以下代码发布时:

--TestLine
Content-Disposition: form-data; name="Description"

test.txt
--TestLine
Content-Disposition: form-data; name="ExternalDocumentType"

ATTACH_DD
--TestLine
Content-Disposition: form-data; name="Filename"

test.txt
--TestLine
Content-Disposition: form-data; name="FormattedAccount"

002.2020.00199659.001
--TestLine
Content-Disposition: form-data; name="ModuleReference"

DD
--TestLine
Content-Disposition: form-data; name="FileUpload";filename=test.txt
Content-Type: text/plain

test upload
--TestLine--
它适用于文本文件和图像文件,但我的图像文件在另一端已损坏,无法打开

然后我读了以下内容:

并试着用这种方式编码:

{
  "content-type": "multipart/form-data",
  "multipart": [
    {
      "body": {
        "$content": "test.txt"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"Description\""
      }
    },
    {
      "body": {
        "$content": "ATTACH_DD"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"ExternalDocumentType\""
      }
    },
    {
      "body": {
        "$content": "test.txt"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"Filename\""
      }
    },
    {
      "body": {
        "$content": "002.2020.00199662.001"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"FormattedAccount\""
      }
    },
    {
      "body": {
        "$content": "DD"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"ModuleReference\""
      }
    },
    {
      "body": {
        "$content": "test upload",
        "$content-type": "text/plain"
      },
      "headers": {
        "Content-Disposition": "form-data; name=\"FileUpload\";filename=\"test.txt\""
      }
    }
  ]
}
但是现在我被禁止了,它甚至不能通过我的API发布

<center><h1>403 Forbidden</h1></center>
<hr><center>Microsoft-Azure-Application-Gateway/v2</center>
403禁止

Microsoft Azure应用程序网关/v2
这对时间很敏感。有人有答案吗


谢谢

此处为同一期此处为同一期