laptop and a wrench

Error

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

Última publicación: January 22, 2019 ArcGIS API for JavaScript
Número de ID del error BUG-000118713
EnviadoDecember 10, 2018
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for JavaScript
Versión encontrada4.9
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoNon-Reproducible

Información adicional

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.

Solución alternativa

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");

Pasos para reproducir

ID del error: BUG-000118713

Software:

  • ArcGIS API for JavaScript

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga