jyJ
Convex Community5mo ago
1 reply
jy

Possible to Pass Checksum to storage.generateUploadUrl?

Is it possible to pass checksum into the storage.generateUploadUrl function (like snippet below) so that the short-lived URL it generates can only be used to upload the intended file?
import { v } from "convex/values";
import { mutation } from "./_generated/server";

export const generateUploadUrl = mutation({
    args: {
        checksum: v.string(),
    },
    handler: async (ctx, args) => {
        return await ctx.storage.generateUploadUrl(args.checksum);
    },
});

I've read the file storage upload doc, and it doesn't look like it's been implemented yet.
https://docs.convex.dev/file-storage/upload-files
Was this page helpful?