Skip to content

CldUploadWidget Examples

Signed Uploads

---
import { CldUploadWidget } from 'astro-cloudinary';
---
<CldUploadWidget signatureEndpoint="<API Endpoint (ex: /api/sign-cloudinary-params)>">
<button>Upload</button>
</CldUploadWidget>

Sources

Controls which sources files can be selected from.

---
import { CldUploadWidget } from 'astro-cloudinary';
---
<CldUploadWidget options={{ sources: ['local', 'url', 'unsplash'] }} uploadPreset="<Your Upload Preset>">
<button>Upload</button>
</CldUploadWidget>

Unsigned Uploads

---
import { CldUploadWidget } from 'astro-cloudinary';
---
<CldUploadWidget uploadPreset="<Your Unsigned Upload Preset>">
<button>Upload</button>
</CldUploadWidget>