The OpenRosa submission API can be used to update submission attachments
- Dominant language
- JavaScript
- Stars
- 226
- Forks
- 235
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 19
Description
Brought up by @brontolosone in the context of building a data replica.
#### Problem description
The OpenRosa submission API allows for several transmissions with the same submission XML. Currently, Central always accepts and persists submission attachments sent with that submission XML, even if doing so replaces an existing file. This means there can never be absolute certainty that a submission is "complete" because theoretically a client could continue replacing files (this would have to be custom functionality).
#### Expected behavior
[The documented OpenRosa submission API](https://docs.getodk.org/openrosa-form-submission/) doesn't say anything about this case so we'll have to extend it.
Two possible approaches:
* silently ignore attachments with a filename for which a file has already been saved.
* reject the POST if an attachment has contents different from the ones that were saved previously. This would be similar to the 409.1 problem returned when two submissions are sent with the same submission id but different XML.
#### Note
This kind of submission attachment update is also possible via the REST API and we could likely apply whatever approach we decide on for OpenRosa to the related REST endpoint as well.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.