使用WP拖放上传,请求有效负载(通过Chrome DevTools)如下所示:
------WebKitFormBoundary
Content-Disposition: form-data; name="name"
butterfly.jpg
------WebKitFormBoundary
Content-Disposition: form-data; name="action"
upload-attachment
------WebKitFormBoundary
Content-Disposition: form-data; name="_wpnonce"
abc123
------WebKitFormBoundary
Content-Disposition: form-data; name="async-upload"; filename="butterfly.jpg"
Content-Type: image/jpeg
------WebKitFormBoundary--
是否可以在此基础上添加更多字段?不使用插件?