Skip to content

Upload file

POSThttps://planefs-uploads.s3.amazonaws.com/

Upload the file using the credentials generated by the Get upload credentials endpoint.

Body Parameters

Content-Type:requiredstring

The MIME type of the file

key:requiredstring

The target path/filename in S3

x-amz-algorithm:requiredstring

AWS signature algorithm (AWS4-HMAC-SHA256)

x-amz-credential:requiredstring

AWS signature algorithm (AWS4-HMAC-SHA256)

x-amz-date:requiredstring

Request timestamp

policy:requiredstring

Base64-encoded policy document

x-amz-signature:requiredstring

Request signature

file:requiredfile

The file to be uploaded

Upload file
bash
curl -X POST \
  "https://api.plane.sohttps://planefs-uploads.s3.amazonaws.com/" \
  -H "X-API-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Content-Type": "example-Content-Type",
  "key": "example-key",
  "x-amz-algorithm": "example-x-amz-algorithm",
  "x-amz-credential": "example-x-amz-credential",
  "x-amz-date": "example-x-amz-date",
  "policy": "example-policy",
  "x-amz-signature": "example-x-amz-signature",
  "file": "example-file"
}'
Response201
json
{
  "id": "resource-uuid",
  "created_at": "2024-01-01T00:00:00Z"
}