1. Show the image using the URL
const options = {
method: "GET",
headers: {
Accept: "application/json",
Authorization: "Bearer {API_Key}",
},
};
const response = await fetch("https://api.upsend.app/images/{id}", options);
// Add type guard
const image = (await response.json()) as {
id: string;
created: string;
updated: string;
user_id: string;
name: string;
size: string;
mime_type: string;
url: string; // ----------------------!!!----------------------
buffer: Buffer;
};
2. Modify the image dynamically
To modify the image, pass the acquired URL into the Cloudflare Transformation service set up for this domain. The end result looks like that (say hello to my dog :)):