Got the profile picture thing working!

This commit is contained in:
2025-09-03 12:51:07 -05:00
parent 6febfa05d4
commit be23ea1070
6 changed files with 102 additions and 43 deletions

View File

@@ -1,12 +1,12 @@
import { mutation, query } from "./_generated/server";
import { v } from "convex/values";
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") },
args: { storageId: v.id('_storage') },
handler: async (ctx, { storageId }) => {
return await ctx.storage.getUrl(storageId);
},