Object Storage Attachments

Get an upload URL to replace an attachment

POST
/api/records/{record_key}/attachments/{file_id}/upload-url

Same as uploading a new attachment, for an existing file_id: upload the new file to the returned form to replace it.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /oauth2/token (valid for 300 seconds).

In: header

Path Parameters

record_key*string

Record key of the record the attachments belong to.

file_id*string

Identifier of the attachment.

Request Body

application/json

expiration*integer

Lifetime of the upload URL in seconds (30–32,400).

Range30 <= value <= 32400
filename*string

Name to store the file under.

Response Body

application/json

curl -X POST "https://example.com/api/records/d1c2e12cfeababc8b95daf6902e210b1/attachments/5416a334-6ce6-4e3b-9a0d-464cb417c094/upload-url" \  -H "Content-Type: application/json" \  -d '{    "expiration": 60,    "filename": "original_file_name_to_save.txt"  }'
{  "action": "string",  "file_id": "string",  "method": "POST",  "form_data": {    "Expires": "string",    "policy": "string",    "Signature": "string",    "OSSAccessKeyId": "string",    "x-oss-security-token": "string",    "callback": "string",    "success_action_status": "string",    "Content-Disposition": "string",    "key": "string",    "property1": "string",    "property2": "string"  }}