API Operational
util.avadhya.in
External Image Utility Microservice. Handles cross-origin image uploads, direct-to-edge binary streaming, and format validation for the Avadhya ecosystem.
Integration Methods
1. Embeddable Upload Widget
Drop-in iframe widget that handles the upload UI and sends the CDN URL back via `postMessage`.
<iframe
src="https://util.avadhya.in/upload-card"
width="100%"
height="300"
frameborder="0">
</iframe>
<script>
window.addEventListener('message', (e) => {
if (e.data?.type === 'EXT_UTIL_UPLOAD_SUCCESS') {
console.log("Uploaded URL:", e.data.url);
}
});
</script>
Preview Widget →2. Headless API Client
Directly integrate the upload function into your own UI or Tiptap editor extension.
import { uploadToExtUtil } from './media-client';
const result = await uploadToExtUtil({
file: imageFile,
assetType: 'article_inline',
userId: 123
});
if (!result.error) {
console.log("CDN URL:", result.cdn_url);
}
Constraints & Attributes
Supported Formats
.jpeg.png.webp.gif.avif
Size Caps by Asset Type
- user_avatar 2 MB
- author_thumbnail 2 MB
- article_inline 5 MB
- author_portrait 5 MB
- author_cover 10 MB
- work_cover 10 MB
- user_cover 10 MB
- collection_cover 10 MB