hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { formClient } from "../client"; |
| 2 | import type { AvatarMeta } from "../client"; |
| 3 | |
| 4 | // PNG, JPEG, WebP or GIF only — no SVG — under the school's max_file_bytes. |
| 5 | // Uploading over an existing avatar replaces it. |
| 6 | export function postMyAvatar(file: File, signal?: AbortSignal): Promise<AvatarMeta> { |
| 7 | const body = new FormData(); |
| 8 | body.append("file", file); |
| 9 | return formClient<AvatarMeta>("/users/me/avatar", body, signal); |
| 10 | } |