cURL
curl --request POST \ --url https://api.tela.com/v2/file
{ "upload_url": "https://file-upload-temporary.9161f3bf787dfc457efb6c4fc312e229.r2.cloudflarestorage.com/3478889e-32fb-4267-9608-d83555b88261/fl_fghme5tu2jesklct5sf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=46f3b221e20b2c259a3f7259cc387d24%2F20241008%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20241008T145809Z&X-Amz-Expires=900&X-Amz-Signature=e63145dc80b75fa489318e23806cd484f8503c33c113cf08990fe2e3d9a3d12c&X-Amz-SignedHeaders=host&x-id=PutObject", "download_url": "https://tmp.files.tela.com/3478483e-322b-1867-9608-d83555b81261/fl_fghme5tu2xeaklct5sf" }
Upload a file to the Tela API
const { download_url, upload_url: uploadUrl } = await fetch( 'https://api.tela.com/v2/file', { method: 'POST' } ).then(res => res.json()) await fetch(uploadUrl, { method: 'PUT', body: file })
Successful completion
The URL to upload the file
The URL to download the file