We use ArcGIS JS API Editor which in turn uses esri.dijit.editing.AttachmentEditor to edit feature attributes and attachments in web browser. However adding attachment (file upload) doesn't work in Chrome and Firefox. A post is made to REST endpoint addAttachment of feature service, with request header Content-Type:text/plain;charset=UTF-8 , and body consisting of serialized DOM tree like:
This fails displaying in error log:
SyntaxError: Unexpected token < at Object.b.fromJson (init.js:220) at Object.json (init.js:177) at s (init.js:182) at c (init.js:66) at d (init.js:66) at b.Deferred.resolve.callback (init.js:67)
Also a string fjson is displayed just below "Choose File" button.
In Edge upload attached file send POST request with correct header, e.g. Content-Type: multipart/form-data; boundary=---------------------------7e1d26607d4 and works correctly.
Actually the same issue exists in ArcGIS Server Manager with upload elements (like Publish service). They don't work in Crome. So I believe there is some issue with dojo library.
Has someone found a workaround for this issue?
(Arcgis js api 3.18)