Added
- Global defaults via
setDefaults() / getDefaults() in @netipar/chunky-core
ChunkUploader constructor merges global defaults with per-instance options (headers are deep-merged)
- Re-exported from all framework packages (
@netipar/chunky-vue3, @netipar/chunky-react, @netipar/chunky-alpine)
Usage
import { setDefaults } from '@netipar/chunky-vue3';
// Once in app.ts:
setDefaults({
withCredentials: true,
headers: { 'X-CSRF-TOKEN': csrfToken },
});
// All useChunkUpload() calls inherit these defaults automatically