Address Greptile company logo feedback

This commit is contained in:
Dotta
2026-03-16 10:05:14 -05:00
parent 2d548a9da0
commit 4dfd862f11
5 changed files with 208 additions and 71 deletions

View File

@@ -11,11 +11,19 @@ export const assetsApi = {
const safeFile = new File([buffer], file.name, { type: file.type });
const form = new FormData();
form.append("file", safeFile);
if (namespace && namespace.trim().length > 0) {
form.append("namespace", namespace.trim());
}
form.append("file", safeFile);
return api.postForm<AssetImage>(`/companies/${companyId}/assets/images`, form);
},
};
uploadCompanyLogo: async (companyId: string, file: File) => {
const buffer = await file.arrayBuffer();
const safeFile = new File([buffer], file.name, { type: file.type });
const form = new FormData();
form.append("file", safeFile);
return api.postForm<AssetImage>(`/companies/${companyId}/logo`, form);
},
};