Register a file uploaded via pre-signed URL
POST/api/v1/storage/register-uploaded-file
Step 3: after uploading, register the fileId with the same folderPath and intended fileName. The backend checks the object at the derived caller-scoped path and reads its stored size and content-type metadata. MIME metadata can be supplied by the uploader and is not byte/content validation. The signed-upload path does not compute a checksum.
An already registered fileId returns the existing record with registered false, which may be omitted. This retry behavior does not prove that a reused signed URL cannot subsequently alter the object. Missing uploaded objects return 404; quota and backend failures require reconciliation.
The following access conditions are preserved as declared intent and are not implemented by generated code: Accepted storage owner context, Storage owner actor routing.
Use this in a guide: Add file attachments to a support request · Organize a customer’s project documents · Upload registration and URL expiry
Request
Responses
- 200
- 404
File registered (or already registered)
No uploaded object found for this fileId (PUT the file first)
After uploading, use the fileId returned by generate-upload-url and the same folderPath and fileName.
Section ID: DOC-CP-files-data-api-registerUploadedFile#example-storage-registerUploadedFile-request
Request example
{
"fileId": "0123456789abcdef0123456789abcdef",
"folderPath": "reports",
"fileName": "welcome.txt"
}
Guide request for Upload and confirm the recording. Replace example resource identifiers with your own authorized values.
Section ID: DOC-CP-files-data-api-registerUploadedFile#example-cookbook-core-platform-files-data-files-03-request
Request example
{
"fileId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"folderPath": "/media",
"fileName": "video.mp4"
}
Illustrative response shape; omitted default fields and actual outcomes depend on the operation.
Section ID: DOC-CP-files-data-api-registerUploadedFile#example-storage-registerUploadedFile-response
Response example
{
"file": {
"fileId": "example_123",
"name": "example",
"path": "documents/example.txt",
"folderPath": "documents/example.txt",
"sizeBytes": "1",
"contentType": "Example text",
"uploadedAt": "example",
"modifiedAt": "example",
"metadata": {},
"tags": [
"example"
],
"description": "example",
"storageRef": {
"bucket": "example",
"key": "example_123",
"provider": "STORAGE_PROVIDER_GCS"
},
"checksum": "example",
"version": 1
},
"registered": true
}
Document ID: DOC-CP-files-data-api-registerUploadedFile. Section identities and revisions.
| Section | Stable reference |
|---|---|
| Register a file uploaded via pre-signed URL | DOC-CP-files-data-api-registerUploadedFile#overview |
| Request | DOC-CP-files-data-api-registerUploadedFile#request |
| Responses | DOC-CP-files-data-api-registerUploadedFile#responses |