Trying to add avatar upload. Project works rn so wanna push

This commit is contained in:
2025-09-03 10:52:10 -05:00
parent 35215d34a1
commit 6febfa05d4
8 changed files with 144 additions and 5 deletions

13
convex/files.ts Normal file
View File

@@ -0,0 +1,13 @@
import { mutation, query } from "./_generated/server";
import { v } from "convex/values";
export const generateUploadUrl = mutation(async (ctx) => {
return await ctx.storage.generateUploadUrl();
});
export const getImageUrl = query({
args: { storageId: v.id("_storage") },
handler: async (ctx, { storageId }) => {
return await ctx.storage.getUrl(storageId);
},
});