Something went wrong. Try again.
leaflet fork for copy edit / bug fixes forked from leaflet.pub/leaflet
Something went wrong. Try again.
1234567891011121314151617181920212223import type { SupabaseClient } from "@supabase/supabase-js";import type { Database } from "supabase/database.types";
// Image facts bake the object's full public URL into data.src, sometimes with// a cache-busting query string; the storage object name is the last path// segment.export function storagePathFromSrc(src: string) { return src.split("?")[0].split("/").at(-1)!;}
export async function enqueueBlobCleanup( supabase: SupabaseClient<Database>, src: string,) { await supabase .from("blob_cleanup_queue") .upsert( { path: storagePathFromSrc(src) }, { onConflict: "path", ignoreDuplicates: true }, ) .throwOnError();}