/api/ImageHosting/scdn/upload
Total calls: 0
Upload Image
Upload an image and get a directly usable CDN link.
Local image file (multipart field image; supports jpg/png/webp/gif/bmp/tiff); choose either this or image_url
Remote image address (http/https), fetched by the server; choose either this or image
Optional: output format, default auto
Optional: specify the CDN domain for the links (e.g. img.scdn.io); leave empty to choose automatically
Optional: storage location
Optional: encrypted upload (encrypted images never take part in deduplication)
Optional: required when password_enabled=true
Optional: password mode, default plain
Optional: required when password_type=qa
- The request body is multipart/form-data (file field image; use the file picker below to upload directly); when using image_url you may also use application/x-www-form-urlencoded.
- The server deduplicates by SHA-256: on a hit the message reports that the image already exists and was deduplicated, and deduped=true.
- This service requires a project signature (app_id/timestamp/nonce/sign); the online debugger signs automatically on the server side.
| Field | Type | Description |
|---|---|---|
| url | string | CDN direct link |
| filename | string | File name |
| storage_backend | string | Storage backend |
| original_size | int | Original size (bytes) |
| compressed_size | int | Compressed size (bytes) |
| compression_ratio | float | Compression ratio |
| deduped | bool | Whether instant-upload (dedup) was hit |
| password_protected | bool | Whether password-protected |
{"url": "https://img.scdn.io/xxxx.jpg", "filename": "xxxx.jpg", "storage_backend": "local", "original_size": 123456, "compressed_size": 98765, "compression_ratio": 80.01, "deduped": false, "password_protected": false}