Skip to content

Can you upload image with filename based on that documents data? #239

Answered by fgatti675
jamiegalbreath asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the late reply.
You can use a callback to change the name of the file:

 video: {
    title: "Video",
    dataType: "string",
    validation: { required: false },
    config: {
        storageMeta: {
            mediaType: "video",
            storagePath: "videos",
            acceptedFiles: ["video/*"],
            fileName: (context) => {
                return context.file.name;
            }
        }
    },
    columnWidth: 400
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jamiegalbreath
Comment options

Answer selected by jamiegalbreath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants