Create presigned upload URL
POST/files/v1/upload-url
S3 presigned URL flow for upload/download with file metadata persistence.
Request Body
| Name | Typ | Beschreibung |
|---|
fileNameerforderlich | string | |
mimeTypeerforderlich | string | |
sizeByteserforderlich | number | |
entityTypeerforderlich | string | |
entityIderforderlich | string | |
Beispiel
curl -X POST https://api.codemeta-os.de/files/v1/upload-url \
-H "X-Tenant-Id: $TENANT" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"fileName": "string",
"mimeType": "string",
"sizeBytes": 0,
"entityType": "string",
"entityId": "string"
}'
const result = await cm.files.post({
"fileName": "string",
"mimeType": "string",
"sizeBytes": 0,
"entityType": "string",
"entityId": "string"
});
Antwortcodes
| HTTP |
Bedeutung |
201 |
Default Response |