Files
petfeed/src/lib/avatar-url.ts
T
admin 3db0692910 refactor(cluster-d): merge getAvatarUrl/getMediaUrl, extract shared upload-progress XHR helper
getAvatarUrl and getMediaUrl were byte-identical bucket URL builders in
two separate files. getAvatarUrl is now a re-export of getMediaUrl —
all ~34 call sites keep working unchanged.

AvatarUpload, MultiImageUpload, and VideoUploadForm each duplicated the
same XHR PUT-with-progress Promise wrapper. The three flows differ too
much (single vs. multi-file, with/without a confirm step) for a single
useFileUpload hook to be a clean fit, so only the truly identical piece
— the XHR PUT itself — was extracted into uploadFileWithProgress().
2026-07-21 20:56:15 +02:00

9 lines
312 B
TypeScript

import { getMediaUrl } from "@/lib/media-url";
/**
* Constructs the public CDN URL for a pet avatar stored in Supabase Storage.
* Identical bucket/path scheme to getMediaUrl — kept as a separate export
* for call-site readability (avatar vs. post/story media).
*/
export const getAvatarUrl = getMediaUrl;