chore: flatten repository to completely erase 255MB history

This commit is contained in:
AI Bot
2026-08-27 17:25:31 +05:30
commit c060841d56
103 changed files with 17799 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { api } from './api';
export const uploadAssetToStorage = async (file: Blob | File, bucket: string, path: string): Promise<string> => {
try {
const url = await api.uploadAsset(file);
return url;
} catch (err) {
console.warn("Storage upload exception, falling back to data URL.", err);
return await fileToDataUrl(file);
}
};
export const fileToDataUrl = (file: Blob | File): Promise<string> => {
return new Promise((resolve) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result as string);
reader.readAsDataURL(file);
});
};