{"id":13142,"date":"2023-11-02T09:28:02","date_gmt":"2023-11-02T01:28:02","guid":{"rendered":"https:\/\/92it.top\/?p=13142"},"modified":"2023-11-02T12:39:32","modified_gmt":"2023-11-02T04:39:32","slug":"%e7%90%86%e8%a7%a3-http-%e4%b8%ad%e7%9a%84-multipart-form-data","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=13142","title":{"rendered":"\u7406\u89e3 HTTP \u4e2d\u7684 multipart\/form-data"},"content":{"rendered":"\n<p><strong>\u80cc\u666f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>HTTP \u662f\u4e00\u79cd\u57fa\u4e8e\u8bf7\u6c42-\u54cd\u5e94\u6a21\u578b\u7684\u7f51\u7edc\u901a\u4fe1\u534f\u8bae\uff0c\u4e3b\u8981\u7528\u4e8e Web \u4e2d\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u901a\u4fe1\u7684\u6570\u636e\u4f20\u8f93\u3002\u4e8b\u5b9e\u4e0a\uff0c\u5982\u4eca\u7684\u4e92\u8054\u7f51\u5c31\u662f\u6784\u5efa\u5728 HTTP \u4e4b\u4e0a\u7684\u3002\u57fa\u4e8e\u8bf7\u6c42-\u54cd\u5e94\u6a21\u5f0f\u7684\u901a\u4fe1\u65b9\u5f0f\u5f88\u7b80\u5355\uff0c\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\uff0c\u670d\u52a1\u5668\u5904\u7406\u8bf7\u6c42\u5e76\u8fdb\u884c\u54cd\u5e94\u3002<br>HTTP \u5176\u5b9e\u5e76\u4e0d\u5173\u5fc3\u6211\u4eec\u60f3\u8981\u4f20\u8f93\u7684\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u6570\u636e\uff0c\u56e0\u4e3a\u5b83\u4ec0\u4e48\u7c7b\u578b\u7684\u6570\u636e\u90fd\u53ef\u4ee5\u4f20\u8f93\uff01\u5bf9\u4e8e\u5ba2\u6237\u7aef\u6216\u8005\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u53ea\u9700\u8981\u8bbe\u7f6e\u597d\u5408\u9002\u7684 Content-Type\uff0c\u8ba9\u53e6\u4e00\u7aef\u80fd\u591f\u7406\u89e3\u6570\u636e\u5c31\u53ef\u4ee5\u4e86\u3002\u5728\u4e00\u4e2a\u8bf7\u6c42\u4e2d\uff0c\u5ba2\u6237\u7aef\u53d1\u9001\u7ed9\u670d\u52a1\u5668\u7684\u6570\u636e\u53ef\u4ee5\u662f\u6587\u672c\uff0c\u4e5f\u53ef\u4ee5\u662f\u56fe\u7247\u6216\u8005\u97f3\u89c6\u9891\u7b49\u7b49\u3002<br>\u5982\u679c\u5ba2\u6237\u7aef\u60f3\u5728\u4e00\u4e2a\u8bf7\u6c42\u4e2d\u7ed9\u670d\u52a1\u5668\u53d1\u9001\u591a\u79cd\u7c7b\u578b\u7684\u6570\u636e\u5462\uff0c\u8be5\u600e\u4e48\u529e\u5462\uff1f\u4f8b\u5982\uff0c\u540c\u65f6\u53d1\u9001\u7528\u6237\u7684\u57fa\u672c\u4fe1\u606f\u548c\u5934\u50cf\u3002\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u5c31\u662f\u4f7f\u7528 HTTP \u7684 multipart\u3002<\/p>\n\n\n\n<p><strong>Multipart \u6d88\u606f\u7ed3\u6784<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><br><\/p>\n\n\n\n<p>Multipart \u5141\u8bb8\u5ba2\u6237\u7aef\u5728\u4e00\u6b21 HTTP \u8bf7\u6c42\u4e2d\u53d1\u9001\u591a\u4e2a\u90e8\u5206\uff08part\uff09\u6570\u636e\uff0c\u6bcf\u90e8\u5206\u6570\u636e\u4e4b\u95f4\u7684\u7c7b\u578b\u53ef\u4ee5\u4e0d\u540c\u3002Multipart \u5e76\u4e0d\u662f\u4e00\u79cd\u4e13\u4e00\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5b83\u6709\u5f88\u591a\u5b50\u7c7b\u578b\uff0c\u4f8b\u5982\uff1amultipart\/mixed\uff0cmultipart\/form-data \u7b49\u3002<br>\u901a\u4fd7\u6765\u8bb2\uff0c\u4e00\u4e2a multipart \u6d88\u606f\u5c31\u662f\u4e00\u4e2a\u5927\u5305\u88f9\uff0c\u5305\u88f9\u91cc\u9762\u6709\u591a\u4e2a\u4e0d\u540c\u7c7b\u578b\u7684\u6d88\u606f\uff0c\u6bcf\u4e00\u4e2a\u6d88\u606f\u5c31\u662f\u4e00\u4e2a part\uff0c\u6bcf\u4e2a part \u90fd\u4f1a\u58f0\u660e\u81ea\u5df1\u7684\u6d88\u606f\u7c7b\u578b\uff08Content-Type\uff09\u3002\u9664\u4e86\u6d88\u606f\u7c7b\u578b\uff0cpart \u8fd8\u53ef\u4ee5\u9644\u52a0\u4e00\u4e9b\u5143\u6570\u636e\u3002<br>Multipart \u6d88\u606f\u7684\u57fa\u672c\u8bed\u6cd5\u7ed3\u6784\u53ef\u4ee5\u5728 RFC2046 \u4e2d\u627e\u5230\uff1a<\/p>\n\n\n\n<ul><li>\u6bcf\u4e2a multipart \u6d88\u606f\u7684 Content-Type \u90fd\u5fc5\u987b\u5305\u542b\u4e00\u4e2a\u53eb\u505a boundary \u7684\u53c2\u6570\uff0cboundary \u58f0\u660e\u4e86\u5404\u4e2a part \u4e4b\u95f4\u7684\u8fb9\u754c\uff0c\u8bb0\u4e3a ${boundary}\u3002\u5b9e\u9645\u4e0a\uff0c\u5b8c\u6574\u7684\u8fb9\u754c\u5b9a\u4e49\u4e3a\uff1a\u4e00\u884c\u7531\u4e24\u4e2a &#8211; \u52a0\u4e0a ${boundary} \u7ec4\u6210\u7684\u5b57\u7b26\u4e32\u3002\u5047\u8bbe\u6211\u4eec\u5728 Content-Type \u91cc\u9762\u6307\u5b9a\u7684 boundary=example-part-boundary\uff0c\u90a3\u4e48\u6309\u7167\u534f\u8bae\u89c4\u5b9a\uff0c\u6bcf\u4e2a part \u4e4b\u95f4\u7684\u5206\u9694\u884c\u5c31\u662f\uff1a&#8211;example-part-boundary\u3002<\/li><li>\u6bcf\u4e2a\u8fb9\u754c\u4e4b\u540e\u662f\u4e00\u4e2a CRLF \u52a0\u4e0b\u4e00\u4e2a part \u7684\u5934\u90e8\u4fe1\u606f\u3002\u5982\u679c\u4e0b\u4e00\u4e2a part \u6ca1\u6709\u5934\u90e8\u4fe1\u606f\uff0c\u8fb9\u754c\u4e4b\u540e\u5c31\u5e94\u8be5\u8ddf\u4e24\u4e2a CRLF\uff0c\u8fd9\u6837\u4e0b\u4e00\u4e2a part \u7684\u6d88\u606f\u7c7b\u578b\u5c31\u4f1a\u88ab\u8ba4\u4e3a\u662f text\/plain\u3002<\/li><li>${boundary} \u4e0d\u80fd\u51fa\u73b0\u5728\u8fb9\u754c\u4e4b\u95f4\uff0c\u5e76\u4e14\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7 70 \u4e2a\u5b57\u7b26\u3002<\/li><li>\u6700\u540e\u4e00\u4e2a part \u4e4b\u540e\u7684\u8fb9\u754c\u5728\u672b\u5c3e\u591a\u4e86\u4e24\u4e2a -\uff0c\u8868\u793a\u540e\u9762\u4e0d\u4f1a\u518d\u6709\u5176\u5b83\u7684 part \u4e86\u3002\u8fd9\u4e2a\u8fb9\u754c\u7684\u5b8c\u6574\u683c\u5f0f\u4e3a\uff1a&#8211;${boundary}&#8211;\uff0c\u4f8b\u5982 &#8211;example-part-boundary&#8211;\u3002<\/li><\/ul>\n\n\n\n<p>\u6211\u4eec\u4f1a\u5728\u540e\u9762\u8bb2&nbsp;<code>multipart\/form-data<\/code>&nbsp;\u7ed9\u51fa\u4e00\u4e2a\u5177\u4f53\u7684\u793a\u4f8b\u3002<\/p>\n\n\n\n<p><code><strong><span class=\"has-inline-color has-black-color\">multipart\/form-data<\/span><\/strong><\/code><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><br><\/p>\n\n\n\n<p>Multipart \u7684\u4f7f\u7528\u5728 Web \u5e94\u7528\u7a0b\u5e8f\u4e2d\u5f88\u5e38\u89c1\u3002\u4f7f\u7528 multipart \u9891\u7387\u6700\u9ad8\u7684\u5730\u65b9\u5927\u6982\u5c31\u662f Web \u8868\u5355\u4e86\uff0c\u5728\u8868\u5355\u63d0\u4ea4\u65f6\uff0c\u6587\u4ef6\u7684\u4e0a\u4f20\u5c31\u662f\u901a\u8fc7 Multipart \u6765\u5b9e\u73b0\u7684\u3002<br>\u5e76\u4e0d\u662f\u6240\u6709\u7684\u8868\u5355\u63d0\u4ea4\u90fd\u4f1a\u4f7f\u7528 multipart\uff0c\u5982\u679c\u8868\u5355\u53ea\u5305\u542b\u57fa\u4e8e\u6587\u672c\u7684\u8f93\u5165\u7ec4\u4ef6\uff08\u4f8b\u5982\u8f93\u5165\u6846\u3001\u5355\u9009\u6846\u7b49\uff09\uff0c\u6d4f\u89c8\u5668\u4f1a\u5c06\u8fd9\u4e9b\u6570\u636e\u4ee5 key=value \u7684\u5f62\u5f0f\u7ec4\u7ec7\uff0c\u4f7f\u7528\u4e00\u79cd\u88ab\u79f0\u4e3a application\/x-www-form-urlencoded \u7684 Content-Type \u4f20\u8f93\u3002<\/p>\n\n\n\n<p>application\/x-www-urlencoded\uff1a\u6570\u636e\u88ab\u7f16\u7801\u6210\u4ee5<code>'&amp;'<\/code>\u5206\u9694\u7684\u952e-\u503c\u5bf9, \u540c\u65f6\u4ee5<code>'='<\/code>\u5206\u9694\u952e\u548c\u503c. \u975e\u5b57\u6bcd\u6216\u6570\u5b57\u7684\u5b57\u7b26\u4f1a\u88ab \u767e\u5206\u6bd4\u7f16\u7801\uff08<a rel=\"noreferrer noopener\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/developer.mozilla.org\/zh-CN\/docs\/Glossary\/percent-encoding\" target=\"_blank\">percent-encoding<\/a>\uff09<\/p>\n\n\n\n<p>\u5982\u679c\u8868\u5355\u4e2d\u5305\u542b\u6587\u4ef6\u6216\u56fe\u7247\u7b49\u4e0d\u80fd\u88ab\u7f16\u7801\u6210\u6587\u672c\u7684\u5143\u7d20\uff0c\u6d4f\u89c8\u5668\u5c31\u4f1a\u4f7f\u7528 multipart\/form-data \u5411\u670d\u52a1\u5668\u4f20\u8f93\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528 multipart\/form-data \u4f20\u8f93\u7528\u6237\u4fe1\u606f\u7684\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">POST \/profile HTTP\/1.1\nHOST: example.com\nContent-Type: multipart\/form-data; boundary=example-part-boundary\n \n--example-part-boundary\nContent-Disposition: form-data; name=\"username\"\nContent-Type: text\/plain\n \nNicholas\n--example-part-boundary\nContent-Disposition: form-data; name=\"address\"\nContent-Type: application\/json\n \n{\n    \"country\": \"China\",\n    \"city\": \"Beijing\"\n}\n--example-part-boundary\nContent-Disposition: form-data; name=\"avatar\"; filename=\"my_avatar.jpeg\"\nContent-Type: image\/jpeg\n \n&lt;binary-image data>\n--example-part-boundary--<\/pre>\n\n\n\n<p><br>\u5728\u4e0a\u9762\u8fd9\u4e2a\u8bf7\u6c42\u4e2d\uff1a<\/p>\n\n\n\n<ul><li><code>Content-Type: multipart\/form-data; boundary=example-part-boundary<\/code>&nbsp;\u8868\u793a\u8fd9\u4e2a\u8bf7\u6c42\u7684\u7684\u6d88\u606f\u7c7b\u578b\u662f&nbsp;<code>multipart-form-data<\/code>\uff0c\u6bcf\u4e2a part \u4e4b\u95f4\u7684\u8fb9\u754c\u4e3a&nbsp;<code>example-part-boundary<\/code>\u3002<\/li><li>\u8fd9\u4e2a\u8bf7\u6c42\u603b\u5171\u5305\u542b\u4e09\u4e2a part\uff1a<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7b2c\u4e00\u4e2a part \u7684\u7c7b\u578b\u4e3a text\/plain\uff0c\u5b83\u5728\u8868\u5355\u4e0a\u5bf9\u5e94\u7684 key \u4e3a username\uff0cvalue \u4e3a Nicholas\u3002\n\u7b2c\u4e8c\u4e2a part \u7684\u7c7b\u578b\u4e3a application\/json\uff0c\u5b83\u5728\u8868\u5355\u4e0a\u5bf9\u5e94\u7684 key \u4e3a address\u3002\n\u7b2c\u4e09\u4e2a part \u7684\u6570\u636e\u7c7b\u578b\u4e3a image\/jpeg\uff0c\u5b83\u5728\u8868\u5355\u4e0a\u5bf9\u5e94\u7684 key \u4e3a avatar\uff0c\u5e76\u4e14 part \u7684\u5934\u90e8\u8fd8\u9644\u52a0\u4e86\u6587\u4ef6\u540d\u76f8\u5173\u7684\u5143\u6570\u636e filename=\"my_avatar.jpeg\u3002\n<\/pre>\n\n\n\n<ul><li>\u6700\u540e\u9762\u7684&nbsp;<code>--example-part-boundary--<\/code>&nbsp;\u8868\u793a\u6574\u4e2a multipart \u6d88\u606f\u7684\u7ed3\u675f\u3002<\/li><\/ul>\n\n\n\n<p><strong>multipart\/form-data\u91cd\u8981\u89c4\u8303\u7279\u5f81<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<ul><li>\u5fc5\u987bpost\u65b9\u5f0f\u53d1\u9001\u6570\u636e\uff1b<\/li><li>Content-Type\u683c\u5f0f\u4e3amultipart\/form-data; boundary=${boundary}\u3002\u6ee1\u8db3\u6761\u4ef6\u7684\u63d0\u4ea4\uff0c\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u521b\u5efaboundary\u3002\u4f8b\u5982chrome\u548csafari\u6d4f\u89c8\u5668\uff0c\u81ea\u52a8\u521b\u5efa\u7684boundary\u683c\u5f0f\u50cf\u4e0b\u9762\u8fd9\u4e2a\u6837\u5b50\uff0c\u5176\u4e2dboundary\u662f\u957f\u5ea6\u4e3a16\u7684\u968f\u673abase64\u5b57\u7b26\u3002<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">----WebKitFormBoundary${boundary}<\/pre>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Content-Type: multipart\/form-data; boundary=----WebKitFormBoundary222BPd3etU0TLTOv<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53d1\u9001\u6570\u636e\u5185\u5bb9\u4ee5------WebKitFormBoundary?${boundary}\u4f5c\u4e3a\u8d77\u59cb\u6807\u8bb0\u548c\u5206\u9694\u7b26\u3001\u7ec8\u7ed3\u6807\u8bb0\u591a\u4e86\u201c--\u201d\uff1b\u6570\u636e\u5185\u5bb9\u4e3b\u8981\u5305\u62ec\uff1aContent-Disposition\u3001Content-Type\u3001\u6570\u636e\u5185\u5bb9\u7b49\uff1b\u5176\u4e2d\u6570\u636e\u5185\u5bb9\u524d\u9762\u6709\\n\\r\u6807\u8bb0\u7684\u7a7a\u884c\uff1bContent-Disposition\u662f\u5fc5\u9009\u9879\uff0c\u5176\u5b83\u90fd\u662f\u53ef\u9009\u9879\uff1bContent-Disposition \u5305\u542b\u4e86 type \u548c \u4e00\u4e2a\u540d\u5b57\u4e3a name \u7684 parameter\uff0ctype \u662f form-data\uff0cname \u53c2\u6570\u7684\u503c\u5219\u4e3a\u8868\u5355\u63a7\u4ef6\uff08username\uff09\u7684\u540d\u5b57\uff0c\u5982\u679c\u662f\u6587\u4ef6\uff0c\u90a3\u4e48\u8fd8\u6709\u4e00\u4e2a filename \u53c2\u6570\uff0c\u503c\u5c31\u662f\u6587\u4ef6\u540d\u3002<\/pre>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">------WebKitFormBoundarywKADO5urZL0xelAF\nContent-Disposition: form-data; name=\"name\"\n\n\n------WebKitFormBoundarywKADO5urZL0xelAF\nContent-Disposition: form-data; name=\"time\"\n\n1586232882192\n------WebKitFormBoundarywKADO5urZL0xelAF\nContent-Disposition: form-data; name=\"f\"\n\n[object FileList]\n------WebKitFormBoundarywKADO5urZL0xelAF--<\/pre>\n\n\n\n<p><strong>\u8865\u5145\uff1a soapui \u53d1\u9001 multipart\/form-data<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1024x518.png\" alt=\"\" class=\"wp-image-13151\" width=\"639\" height=\"322\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1024x518.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-300x152.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-768x388.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-830x420.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-230x116.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-350x177.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-480x243.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247.png 1468w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-1024x616.png\" alt=\"\" class=\"wp-image-13153\" width=\"638\" height=\"384\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-1024x616.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-300x180.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-768x462.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-1536x924.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-830x499.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-230x138.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-350x211.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1-480x289.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/11\/\u56fe\u7247-1.png 1636w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\uff081\uff09\u5728\u56fe\u91cc1\u4e2d\uff0c\u786e\u8ba4\u8bf7\u6c42\u662f\u5426\u6709\u53c2\u6570\uff1b<\/li><li>\uff082\uff09\u5728\u56fe\u91cc2\u4e2d\uff0c\u786e\u8ba4\u4f20\u8f93\u5185\u5bb9\u7c7b\u578b\uff08\u6ce8\uff1a2\u4e2d\u540e\u9762\u6709\u4e2a\u9009\u62e9\u6846\uff0c\u5982\u679c\u9009\u62e9\uff0c\u4f1a\u5c061\u4e2d\u53c2\u6570\u548c\u503c\uff0c\u76f4\u63a5\u62fc\u63a5\u5728url\u4e2d\u8fdb\u884c\u8bf7\u6c42\uff1b\u5982\u679c\u6ca1\u6709\u9009\u62e9\uff0c\u5219\u5728body\u4e2d\u4f20\u8f93\uff0c\u4e00\u822c\u5efa\u8bae\u662f\u9009\u62e9\uff1amultipart\/form-data\uff0c\u5982\u56fe\uff09\uff1b<\/li><li>\uff083\uff09\u5207\u6362\u5230Attachments\u6807\u7b7e\u9875\uff0c\u5728\u56fe\u91cc3\u4e2d\uff0c\u70b9\u51fb\u201c+\u201d\u4e0a\u4f20\u9644\u4ef6\uff0c\u5e76\u627e\u5230\u5217\u8868\u4e2dContentID\u5b57\u6bb5,\u8fd9\u4e2aid\u662f\u5bf9\u5e94\u201dContent-Disposition\u201d\u4e2d\u7684name\u53c2\u6570\u503c\uff0c\u9700\u6ce8\u610f\uff08\u6ce8\uff1a\u81ea\u884c\u53bb\u767e\u5ea6Content-Disposition\u7684\u4f5c\u7528\uff09<br><\/li><\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Multipart \u662f\u4e00\u79cd\u5e38\u89c1\u7684\u6570\u636e\u683c\u5f0f\uff0c\u5e38\u7528\u4e8e\u4e0a\u4f20\u6587\u4ef6\u548c\u53d1\u9001\u5305\u542b\u591a\u79cd\u6570\u636e\u7c7b\u578b\u7684\u5355\u4e2a\u8bf7\u6c42\u3002\u6b63\u786e\u5730\u4f7f\u7528 multipart \u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0\u591a\u79cd\u6570\u636e\u7684\u4f20\u8f93\uff0c\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u6548\u7387\u548c\u7528\u6237\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c\u51cf\u5c11\u670d\u52a1\u5668\u7684\u8bf7\u6c42\u6b21\u6570\u3002<br>\u4f46\u662f\uff0c\u5728\u4f7f\u7528 multipart \u7684\u65f6\u5019\uff0c\u5ba2\u6237\u7aef\u5fc5\u987b\u6b63\u786e\u5730\u8bbe\u7f6e Content-Type \u8bf7\u6c42\u5934\uff0c\u5305\u542b boundary \u53c2\u6570\uff0c\u5e76\u4e14 boundary \u53c2\u6570\u7684\u5185\u5bb9\u4e0d\u80fd\u548c\u8bf7\u6c42\u4f53\u5185\u7684\u5185\u5bb9\u91cd\u590d\u3002\u670d\u52a1\u5668\u6536\u5230\u8bf7\u6c42\u540e\uff0c\u9700\u8981\u6839\u636e Content-Type \u8bbe\u7f6e\u7684 boundary \u6765\u89e3\u6790\u8bf7\u6c42\u4f53\u5404\u4e2a\u90e8\u5206\u7684\u5185\u5bb9\u3002<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f HTTP \u662f\u4e00\u79cd\u57fa\u4e8e\u8bf7\u6c42-\u54cd\u5e94\u6a21\u578b\u7684\u7f51\u7edc\u901a\u4fe1\u534f\u8bae\uff0c\u4e3b\u8981\u7528\u4e8e Web \u4e2d\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u901a\u4fe1\u7684\u6570\u636e\u4f20\u8f93\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13142"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13142"}],"version-history":[{"count":8,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13142\/revisions"}],"predecessor-version":[{"id":13154,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13142\/revisions\/13154"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}