sistema-de-chamados/web/convex/files.ts
Factory Droid 533d9ca856 fix: refresh comment attachment previews
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-10-05 01:38:51 -03:00

18 lines
418 B
TypeScript

import { action } from "./_generated/server";
import { v } from "convex/values";
export const generateUploadUrl = action({
args: {},
handler: async (ctx) => {
return await ctx.storage.generateUploadUrl();
},
});
export const getUrl = action({
args: { storageId: v.id("_storage") },
handler: async (ctx, { storageId }) => {
const url = await ctx.storage.getUrl(storageId);
return url;
},
});