jCtapukJ
Convex Community16mo ago
4 replies
jCtapuk

generateUploadUrl(...)

Add options to generateUploadUrl so you can specify what file types or sizes are allowed. Otherwise, it turns out that they can fill it with whatever they want, which ruins the idea.
Example
generateUploadUrl({contentType: "image/png", maxSize: 1024})
or multiple
generateUploadUrl([{contentType: "image/png", maxSize: 1024}, {contentType: "image/jpeg", maxSize: 1024}])


When the user tries to send a file to a link, if the format is not suitable, then return an error
Was this page helpful?