Generate a presigned URL for uploading a document securely
The type of the file for which the presigned URL is being generated (e.g., ‘jpeg’).
Responses
The URL to which the file should be uploaded.
Additional fields required by the storage service to accompany the upload request.
Echoes back the type of the file that was specified in the request.
A unique identifier for the uploaded file in the storage system.
No content
No content
No content
POST /api/v1/presigned-url HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"fileType": "text"
}
curl -L \
--request POST \
--url '/api/v1/presigned-url' \
--header 'Content-Type: application/json' \
--data '{
"fileType": "text"
}'
const response = await fetch('/api/v1/presigned-url', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"fileType": "text"
})
});
const data = await response.json();
import json
import requests
response = requests.post(
"/api/v1/presigned-url",
headers={"Content-Type":"application/json"},
data=json.dumps({
"fileType": "text"
})
)
data = response.json()
{
"presignedUrl": "text",
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"fileType": "text",
"key": "text"
}
No content
No content
No content