-
Notifications
You must be signed in to change notification settings - Fork 171
[api] upload endpoints must return new item IDs #2327
Description
When a file is uploaded, it may end up being converted by the pipeline. If this is the case, the DMS itself is the only instance that knows the SHA256sum of the resulting file. Users trying to assess existence of a file using the sec/checkfile/<sha256sum> API will never be able to find the file.
The upload API endpoints should return data about the documents the DMS processed, which the user cannot know: SHA256sum is a candidate, document ID definitely should be returned to the caller on success.
Update: Solving #2328 would address this issue as well. However, I still think that the upload endpoints can return the information the upload generated, such as the document ID, and potentially save the user one API call, thus speeding everything up.