Skip to main content
POST
/
uploads
/
validate
curl -X POST "https://app.drime.cloud/api/v1/uploads/validate?workspaceId=0" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {"name": "photo1.jpg", "size": 1048576, "relativePath": "/photos"},
      {"name": "photo2.jpg", "size": 2048576, "relativePath": "/photos"}
    ]
  }'
{
  "errors": false,
  "duplicates": [],
  "status": "success"
}

Overview

Validates files before upload by checking if files with the same name already exist at the specified location. Returns a list of duplicate filenames.

Query Parameters

workspaceId
integer
Workspace ID

Request Body

files
array
required
Array of files to validate

Response

errors
boolean
true if duplicates were found
duplicates
array
Array of filenames that already exist
status
string
Request status (success)
curl -X POST "https://app.drime.cloud/api/v1/uploads/validate?workspaceId=0" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {"name": "photo1.jpg", "size": 1048576, "relativePath": "/photos"},
      {"name": "photo2.jpg", "size": 2048576, "relativePath": "/photos"}
    ]
  }'
{
  "errors": false,
  "duplicates": [],
  "status": "success"
}
Use /entry/getAvailableName to get an alternative filename when duplicates are found.