jCtapuk
jCtapuk4mo ago

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}])
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
4 Replies
Convex Bot
Convex Bot4mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Ask in the <#1228095053885476985> channel to get a response from <@1072591948499664996>. - Avoid tagging staff unless specifically instructed. Thank you!
jamalsoueidan
jamalsoueidan4mo ago
You can use httpAction to handle that situtation.
jamalsoueidan
jamalsoueidan4mo ago
Look under Uploading files via an HTTP action