better profile photo update logic
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
export default async function avatarExists(fileUrl: string): Promise<boolean> {
|
||||
const response = await fetch(fileUrl, { method: "HEAD" });
|
||||
return !(response.headers.get("content-type") === "text/plain");
|
||||
}
|
||||
Reference in New Issue
Block a user