Skip to content

Complete File Storage

POST /public/storage/file/{fileId}/complete

Finalize a file upload after the file has been successfully uploaded to the presigned URL. This marks the file as ready for use.

Endpoint Details

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Addon Storage

Parameters

ParameterTypeRequiredDescription
fileIdstringYesThe unique ID of the uploaded file (returned from Init File).

Example Request

bash
curl -X POST "https://api.repliz.com/public/storage/file/680affa5ce12f2f72916f67e/complete" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from "axios";

const fileId = "680affa5ce12f2f72916f67e";

const response = await axios.post(
  `https://api.repliz.com/public/storage/file/${fileId}/complete`,
  {},
  {
    auth: {
      username: "YOUR_ACCESS_KEY",
      password: "YOUR_SECRET_KEY",
    },
  },
);

console.log(response.data);
javascript
const credentials = btoa("YOUR_ACCESS_KEY:YOUR_SECRET_KEY");

const fileId = "680affa5ce12f2f72916f67e";

const response = await fetch(
  `https://api.repliz.com/public/storage/file/${fileId}/complete`,
  {
    method: "POST",
    headers: {
      Authorization: `Basic ${credentials}`,
    },
  },
);

const data = await response.json();
console.log(data);

Response

json
// No content returned on success
json
{
  "code": 429,
  "message": "upgrade to get more storage"
}
json
{
  "code": 401,
  "message": "unauthorized"
}