Hello all,
I making a QML application where the user can interact with Attachments. Attachments can be added, updated, or deleted. Everything works as expected when I am working with attachments in a .geodatabase file on the device. However, when I try to add or update Attachments on the online geodatabase, the Attachments are added or updated with incorrect values in the CONTENT_TYPE and ATT_NAME columns in the attachment table. I am trying to store all attachments with a content type of "application/octet-stream", but when I upload a .jpg as an attachment, it is stored as "image/jpeg". Also, the attachment name is being automatically set to the file name which is the behavior I want, but I am unable to manually set a name, which I can do when connected to the .geodatabase file.
I am using the addAttachment() and updateAttachmentWithIndex() tasks to add and update the attachments (for example: attachments.addAttachment(url, "application/octet-stream, fileName");). I am using the same code for the online geodatabase and the.geodatabase file, but they are giving different results. Also, when I sync the .geodatabase file to the online geodatabase, the data is transferred over properly.
Does anyone know what I may be doing wrong?
Thanks,
Keith