Skip to main content
Solved

Unable to update file using staging

  • May 6, 2025
  • 1 reply
  • 12 views

Forum|alt.badge.img+4

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?

 

Best answer by Robert Wijn 2

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. 

View original

1 reply

Forum|alt.badge.img+4
  • Author
  • Vanguard
  • 49 replies
  • Answer
  • May 7, 2025

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings