It is possible through REST API to create attachments for documents that don't even exist
Opened this issue · 0 comments
See #54 (comment)
During reviewing #54, I came across some very strange behavior: It is possible through REST API to create attachments for documents that don't even exist. (I just took the rest example and uploaded an attachment via POST to rest/document_indices/quakeml/1/attachments
, assuming that this would be the first indexed quake, but since the document index is shared across all document types, i don't even have rest/document_indices/quakeml/1/
since i indexed stations first. But it's still possible to upload an attachment to this non-existent quakeml document, receiving a HTTP 201)
To add to the confusion, these attachments then end up being listed under rest/document_indices/stationxml/1/attachments
..:
And they're also listed under rest/document_indices/quakeml/1/attachments
(along with attachments for station with document index 1) which is then really strange: