Toggle menu

Update: PUT /filestore/http/file/[fileId][?uploaderid=OptionalUsername]

Updates either:

  • An existing file entry with a new file supplied in the multipart HTTP call, retaining the fileId, references, createdBy, and uploaderId fields
  • Existing file record properties with those received via query parameters

Request Parameters

NameTypeComments
fileFile Field(Optional) A single file to replace the existing file, supplied as a file field in the multipart POST request.
uploaderIdQuery Param(Optional) Update/set the freetext identifier of the uploader (e.g. the site username)
originalFileNameQuery Param(Optional) Update the file name for the stored file.
mimeTypeQuery Param(Optional) Update the mime type for the stored file.
lastUpdatedByQuery Param(Optional) Update who last updated the file.

Example Request

PUT Request
 

Example response - Success

Note that the file has been updated but the id is still the same.

{
    "id": "c1c80e72-244c-4111-87cf-bdbbe5cd570b",
    "filename": "pusheen.png",
    "type": "image/png",
    "hash": "ba44f7f8f88543fbf91f9b9eb0217cfe",
    "size": 37029,
    "references": [],
    "created": "2016-02-22T11:40Z",
    "createdBy": "Pusheen",
    "lastUpdated": "2016-02-22T11:40Z",
    "lastUpdatedBy": "Stormy"
}

Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon