laptop and a wrench

Bogue

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

Dernière publication: January 22, 2019 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000118713
EnvoiDecember 10, 2018
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.9
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
StatutNon-Reproducible

Informations supplémentaires

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.

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000118713

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement