laptop and a wrench

漏洞

FeatureLayer.addAttachment() is returning the HTML response with a feature service hosted on an enterprise environment.

上次发布: January 22, 2019 ArcGIS API for JavaScript
漏洞 ID 编号 BUG-000118713
已提交December 10, 2018
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本4.9
操作系统Windows OS
操作系统版本10.0 64 Bit
状态Non-Reproducible

附加信息

When using a multi-part post to send the file data, all parameters of the request have to be passed in the body of the request in the correct form. This includes the format (f) parameter which is not to be included in the querystring.

解决办法

Add the following bolded line of code to the HTML form:

<form id="importFileForm">

   Upload a file: <input type="file" name="attachment" id="fileinput">

   <input type="hidden" name="f" value="json">

 </form>

Or if using FormData class use the following code:

let form = new FormData();

form.set("attachment",file);

form.append("f","json");

重现步骤

漏洞 ID: BUG-000118713

软件:

  • ArcGIS API for JavaScript

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项