Take a staged file out of an upload request
/file/upload-request/{id}/file/{file_id}
Deletes the staged bytes and the slot: a file the person removed, an upload they cancelled mid-flight, or one that stalled. Scoped to this request (a file id of another request is simply gone). Removing a file already gone is a success; on a request that is already confirmed it is `409` `upload_request_closed` (a confirmed file is deleted with `DELETE /file/{id}`).
Path Parameters
Request id (fupr_…).
The staged file’s id from the request.
Response Body
curl -X DELETE 'https://api.elaichi.ai/file/upload-request/<id>/file/<file_id>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/file/upload-request/<id>/file/<file_id>', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/file/upload-request/<id>/file/<file_id>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
print(response.json())