Blob

Copy a blob to a new location

Changed on
post/blob/copy

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/blob/copy
  • Auth: HTTP bearer

Request body

fromUrlstring required

Source blob URL or pathname

projectIdinteger nullable

Project ID (required for API key/session auth, optional for deployment tokens)

toPathnamestring required

Destination pathname

Example request

{
  "fromUrl": "/api/blob/10/images/avatar.png",
  "projectId": 1,
  "toPathname": "images/avatar-copy.png"
}

Response

Blob copied successfully

contentTypestring required

Content type of the blob

pathnamestring required

Original pathname

sizeinteger required

Size in bytes

uploadedAtstring date-time required

Upload timestamp

urlstring required

URL path to access the blob

Example response

{
  "contentType": "image/png",
  "pathname": "images/avatar-abc123.png",
  "size": 12345,
  "uploadedAt": "2025-01-03T12:00:00Z",
  "url": "/api/blob/123/images/avatar-abc123.png"
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status