1bd1a89c6880403d134038e297c378d596f8e210
- Create AvatarUpload.tsx: idle/dragging/uploading/error/idle-with-avatar states - XHR PUT to R2 presigned URL with progress tracking (Content-Type must match presignedUrl) - Two-step upload: getPresignedUrl -> XHR PUT -> confirmUpload -> CDN URL display - Client-side validation: size <= 10MB, type jpeg/png/webp - Disabled state in create mode (no petId) with tooltip - Drag and drop: dragOver/dragLeave/onDrop handlers; orange border in dragging state - Wire AvatarUpload into PetForm replacing AvatarUploadZone stub - Add initialAvatarKey prop and currentAvatarKey state to PetForm - onUploadComplete invalidates React Query cache (pets.byId + pets.list)
Languages
TypeScript
98.6%
Shell
0.5%
CSS
0.4%
HTML
0.2%
JavaScript
0.2%
Other
0.1%