POST
/v1/viewer-url/uploadFile Upload API
When a client uploads a CAD file directly, it is stored on the server and a Viewer-accessible Signed URL is generated. File upload uses `multipart/form-data` format. Uploaded files are stored in server storage and accessed by the Viewer through the Signed URL.
Headers
| Field Name | Type | Required | Description |
|---|---|---|---|
| x-client-id | string | Required | Client ID |
| x-api-key | string | Required | API Key |
| Content-Type | string | Required | Request Body |
Request Bodymultipart/form-data
| Field Name | Type | Required | Description |
|---|---|---|---|
| file | binary | Required | CAD DWG file to upload (20MB or less) |
| fileInfo | string (JSON) | Required | File metadata (JSON string) |
| userId | string | Optional | User ID |
| planCode | string | Optional | Plan code |
fileInfoObject Structure
| Field Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Unique file ID |
| name | string | Required | File name |
| Status | Description | Error Code | Message | Response |
|---|---|---|---|---|
| 200 | File uploaded successfully | - | - | |
| 400 | Invalid Client | VIEWER_URL_INVALID_CLIENT | Invalid client | |
| 400 | Missing Credentials | VIEWER_URL_INVALID_API_KEY | Invalid client-id or api-key | |
| 400 | Validation Error | VIEWER_URL_VALIDATION_ERROR | fileInfo: name should not be empty... | |
| 400 | Plan Not Exists | VIEWER_URL_CLIENT_PLAN_NOT_EXISTS | The webcad client plan not exists | |
| 413 | Payload Too Large | VIEWER_URL_FILE_TOO_LARGE | File too large |