Files

Change filename visibility for an existing file

Choose whether the file's existing filename appears in its canonical URL. The stored filename, download filename, file bytes, file_id, expiry, and upload usage do not change. Showing the filename preserves the previous opaque URL. Hiding the filename revokes the previous filename-visible URL.

patch/v1/files/{file_id}

Request

  • Base URL: https://filepost.dev (the document declares no server; this is the origin it was published from)
  • URL: https://filepost.dev/v1/files/{file_id}
  • Auth: none declared

Path parameters

file_idstring required

Headers

X-API-Keystring nullable

Request body

filename_mode'download' | 'public' required

Set to download to keep the filename out of the canonical URL, or public to show the filename in the canonical URL.

Example request

{
  "filename_mode": "public"
}

Response

Successful Response

file_idstring required
urlstring required
namestring required
sizeinteger required
content_typestring required
created_atstring required
expires_atstring nullable required
filename_mode'download' | 'public' required
changedboolean required
previous_urlstring nullable required
previous_url_preservedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.