Complete File Upload
curl --request POST \
--url https://api.example.com/upload/{file_id}/completeimport requests
url = "https://api.example.com/upload/{file_id}/complete"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/upload/{file_id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/upload/{file_id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/upload/{file_id}/complete"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/upload/{file_id}/complete")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/upload/{file_id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}File Management
Complete File Upload
Mark a file upload as complete and update metadata.
Call this endpoint after successfully uploading a file using the presigned URL
from the /upload/{filename} endpoint to finalize the upload process.
Parameters:
- file_id: The file ID returned from the initial upload request
Optional Request Body:
{
"size": 1048576 // File size in bytes
}
Response:
- Upload completion status
- Final file metadata
- Upload timestamp
POST
/
upload
/
{file_id}
/
complete
Complete File Upload
curl --request POST \
--url https://api.example.com/upload/{file_id}/completeimport requests
url = "https://api.example.com/upload/{file_id}/complete"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/upload/{file_id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/upload/{file_id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/upload/{file_id}/complete"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/upload/{file_id}/complete")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/upload/{file_id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Path Parameters
Response
Successful Response