Upload an asset by requesting a signed URL, sending the file bytes to storage, and checking the resulting upload record.
Before you start
Use Bash, curl, and jq in a temporary working directory. You need a Veryfront API key with write access to the target project. Replace the placeholders below.
Steps
- Request a signed URL for the file's path, content type, and actual byte size.
- Send the file to that URL with every returned required header.
- Find the upload record and verify its status and size.
Try it with REST
POST /projects/{project_reference}/uploads
The response reserves an upload. It doesn't transfer the file. Send the bytes in a separate request:
Use the returned headers exactly. The storage request uses the signed URL, not your Veryfront bearer key. Keep upload-response.json out of source control because it contains that URL.
Verify
GET /projects/{project_reference}/uploads
Find example.txt, confirm its size matches UPLOAD_SIZE, and wait for status: "active". Repeat the list request if activation is still pending. If there are more results, follow page_info pagination before concluding that the record is missing.
If the PUT fails, inspect the storage error and check the required headers, file size, and URL expiry. Request a new upload URL when the original is no longer valid. A failed upload record needs investigation rather than being treated as a completed asset.
Open the asset in Studio's Uploads panel to inspect its contents. Uploads are separate from source files and searchable knowledge. Uploading an asset doesn't create a source file or index it for retrieval.