POST
/
v1
/
objects
Blob Object Post
curl --request POST \
  --url https://blob.squarecloud.app/v1/objects \
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "status": "success",
    "response": {
        "id": "3155597145698959364/test_lxch4k7y-07ee.png",
        "name": "test",
        "size": 416230,
        "url": "https://public-blob.squarecloud.dev/3155597145698959364/test_lxch4k7y-07ee.png"
    }
}
file
file
required
Use FormData. (multipart/form-data)
name
string
required
A string representing the name of the file. (without extension)
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
prefix
string
A string representing the prefix for the file.
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
expire
number
A number indicating the expiration period of the file, ranging from 1 to 365 days.
security_hash
boolean
Set to true if a security hash is required.
auto_download
boolean
Set to true if the file should be set for automatic download.

Response

status
string
Indicates whether the call was successful. “success” if successful, “error” if not.
response
object
{
    "status": "success",
    "response": {
        "id": "3155597145698959364/test_lxch4k7y-07ee.png",
        "name": "test",
        "size": 416230,
        "url": "https://public-blob.squarecloud.dev/3155597145698959364/test_lxch4k7y-07ee.png"
    }
}

Troubleshooting

// The provided object name is invalid.
// Must adhere to the a to z, A to Z, 0 to 9, and _ pattern.
{
    "status": "error",
    "code": "INVALID_OBJECT_NAME"
}
The current maximum file size is 100MB. In the future, we plan to increase it to 10GB. For now, the limit is 100MB due to technical and load-balancing constraints.
// The provided file is invalid.
{
    "status": "error",
    "code": "INVALID_FILE"
}