AnsweredAssumed Answered

Uploading attachment with SDK 100.2 fails without returning any Error

Question asked by Sven.Aanesengeodata-no-esridist Employee on Apr 25, 2018
Latest reply on Apr 26, 2018 by NFurness-esristaff

I'm trying to upload images as attachments using the ArcGIS SDK for iOS version 100.2.


feature.addAttachment(withName: "somename", contentType: "jpg", data: data) { (attachment, error) in

                if let error = error {


                } else if let attachment = attachment {


                } else {

                    reject(APIErrors.queryError(reason: "addAttachment failed. Didn't return any attachment."))




After adding the attachment I .applyEdits() and then perform a new fetchAttachments(). Everything looks OK, no error messages and the new attachment is returned and I can display the image.


On the server side the story is quite different. The attachments never reaches the database. The server log says that the attachment is to large, which surely is not the case. It doesn't matter how much we set the MaxUploadFileSize to be...


How come we never get any errors back to the native side of the SDK?

Any help on this issue is highly appreciated. 


Using the app in offline mode, adding attachments and syncing the geodatabase back to the server is successful. 

We have also tried using Collector (using SDK 10.3) and Collector Aurora (using SDK 100.3) with success uploading images online.


Could there be a bug in version 100.2?