I'm using appstudio, and trying to add attachment to a feature service that doesn't enable reading capability.
I do so using
But this doesn't work for me, could you please let me know if there is another way for adding attachments to it.
Thanks in advance.
Thanks Lucas Danzinger for your response.
I already had a look on it, but the problem that it works against a feature service that has read capability, which enables us selecting the feature and adding attachment, but in my case the feature service doesn't has read cabibility so no way to see the features and selecting them.
I think the only way for doing so, is through the sending post request to the rest endpoint but the header's content-type should be x-www-form-urlencoded, - i do this successfully using postman, but till now i'm not able to do so through QML.
Read only, meaning the Query endpoint is not enabled, correct? If correct, then I can't think of a good way to do this in the Runtime API, because you'd typically do this through a ServiceFeatureTable object. However, in order to populate the feature table with features, it will need to be able to call query on the service.
Outside of the Runtime API, you could make a request like you mentioned. ex: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/3088311/addAttac...
With AppStudio you could use the NetworkRequest type perhaps - https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-networkrequest/
Yes, the query endpoint is not enabled, and as a result i can't make use of this way
when i try to do so, it says "this operation is not supported" -- as shown in attached picture.
If there is such a method in QML, i will be grateful if you let me know.
(a way for getting file's data as a base64 encoded string)