ファイルの名前変更・移動

PUT/chat-rooms/:roomId/files/:fileId

ファイル名の変更と、別フォルダへの移動を行います。移動先に同名のファイルがある場合は採番されます。

認証要ログイン

パスパラメータ

roomIdstring必須

チャットルーム ID。

fileIdstring必須

ファイル ID。

リクエストボディ

namestring

新しいファイル名。

folderIdstring

移動先フォルダ。null でルート直下。

リクエスト
curl https://api.4s.link/chat-rooms/ROOM_ID/files/FILE_ID \
-X PUT \
-H "Authorization: Bearer 4s_at_..." \
-H "Content-Type: application/json" \
-d '{
"name": "report-final.pdf",
"folderId": "fd1a2b3c-..."
}'
レスポンス例
{
"type": "file",
"id": "cf1a2b3c-...",
"name": "report-final.pdf",
"folderId": "fd1a2b3c-...",
"mimeType": "application/pdf",
"size": 1234567
}