Updates the metadata of an uploaded file. The request body is passed directly to MongoDB updateOne, so any valid upload fields can be sent. Sending institution as an empty string triggers a $unset to remove the institution field. Users with accountType user can only update their own files. Admins can only update files within their own institution.
JWT token passed in x-access-token header
The unique identifier of the upload to update (must be a valid ObjectId)
Accepts any fields to pass through to MongoDB updateOne. Common fields are listed below, but the endpoint does not restrict which fields can be sent.
The original name of the uploaded file
"markdown_render_with_error_boundary"
The new status for the upload. active: default status. selected: file will be included in RAG searches. deleted: soft deleted, hidden from lists and RAG.
active, selected, deleted "selected"
Determines whether the file remains confidential when status is selected; will not be cited as source or its location will not be made available to users.
true
Institution ID to share the file with. Send an empty string "" to unset (remove) the institution field via $unset.