Can I limit size and dimensions of images that I u...
# off-topic
j
Can I limit size and dimensions of images that I upload to supabase storage via RLS?
g
You can only set an overall size limit with storage settings. The storage code does the RLS check on the database, then stores the file to storage, then updates the database with file info metadata. So by the time any sort of meta data is sent to database, it is too late for RLS. (This is based on memory of looking at storage code a couple of weeks ago)
j
@User we have released Edge Functions now, which might be helpful for dealing with varying sizes/dimensions or even things like cropping or resizing an image before being inserted into a storage bucket.
p
@jonny just thinking how to best solve handling of user uploaded images. I would love to use edge functions, but the docs have a disclaimer not to use it in prod.. Do you foresee any breaking changes or it's stable but the disclaimer is there just to be safe?
j
yep, that warning is still valid. there might be breaking changes up until August 2022
Unless there is an announcement stating otherwise