Upload Image
curl --request PUT \
--url https://api.legitmark.com/{presigned-url} \
--header 'Content-Type: image/jpeg' \
--data '"<string>"'const options = {
method: 'PUT',
headers: {'Content-Type': 'image/jpeg'},
body: JSON.stringify('<string>')
};
fetch('https://api.legitmark.com/{presigned-url}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.legitmark.com/{presigned-url}"
payload = "<string>"
headers = {"Content-Type": "image/jpeg"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legitmark.com/{presigned-url}"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "image/jpeg")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"Media Management
Upload Image
Upload image file directly to the pre-signed URL obtained from the media upload endpoint. This is a direct upload to AWS S3 using the URL returned from GET /api/media/upload-url.
PUT
/
{presigned-url}
Upload Image
curl --request PUT \
--url https://api.legitmark.com/{presigned-url} \
--header 'Content-Type: image/jpeg' \
--data '"<string>"'const options = {
method: 'PUT',
headers: {'Content-Type': 'image/jpeg'},
body: JSON.stringify('<string>')
};
fetch('https://api.legitmark.com/{presigned-url}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.legitmark.com/{presigned-url}"
payload = "<string>"
headers = {"Content-Type": "image/jpeg"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legitmark.com/{presigned-url}"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "image/jpeg")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"Path Parameters
The complete pre-signed URL returned from GET /api/media/upload-url endpoint
Body
image/jpegimage/pngimage/jpg
Binary image file data
The body is of type file.
Response
Image uploaded successfully to S3
S3 response (usually empty for successful uploads)