Skip to content
On this page

Cloud Storage Rename

🔑 Need JWT Authorization

Description

Rename cloud storage file or directory

Method And Path

js
POST /v2/cloud-storage/rename

Request

ts
{
    "authorization": string;
    "x-request-id": string;
    "x-session-id": string;
}

Body

ts
{
    "fileUUID": string;
    "newName": string;
}

fileUUID

File or directory uuid

newName

File or directory new name

If target is directory, format is: directory-name

  • maxLength: 50
  • minLength: 1

Response

Success

HTTP Status Code: 200

ts
{
    status: Status.Success,
    data: {}
}

Extends Type: Status

Failed

HTTP Status Code: 200

ts
{
    status: Status.Failed,
    code: ErrorCode
}

Extends Type: Status, ErrorCode

Examples

directory

  • oldNew: a
  • newName: b
  • result: b

file

  • oldNew: a.png
  • newName: b.jpg
  • result: b.jpg.png

Released under the MIT License.