Skip to main content

Hi,

I am trying to update a file in a document table using stage_edit with Postman. Everything looks to work fine. All the right status codes, but nothing happens. The record remains unchanged. The steps I take to perform the update are:

  1. create a stage which returns a 201 Created and a stage_id: POST .../document(document_id=50)/stage_edit
  2. then using a PATCH .../staged_document(<STAGE_ID>) I assign the new filename, in our case "storage_location": "xyz.pdf" using a JSON payload which returns a 200 OK and "resource_changed": true in the result body
  3. then I upload the physical file (a local PDF) using POST .../staged_document(<STAGE_ID>)/upload_storage_location which results in a 204 No Content
  4. and to finish up I commit the stage using POST ../staged_document(<STAGE_ID>)/commit which results in a 201 Created and the correct Location value in the headers

 

The initial creation of the document record follows a similar path using stage_add and creates the document-record with attached file in the storage_location correctly.

Any idea what I might be missing?

 

If you look at something long enough, the solution will present itself. It seemed that in the subject the update handler was checked, but no update handler template was created, so no updating was done. 


Reply