Deploy to production

This commit is contained in:
AI Bot
2026-07-30 12:49:29 +05:30
parent 0d9c9eaadd
commit 07a1e8f37f
30 changed files with 6363 additions and 4887 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);
});
};