I'm trying to figure out how or if I can somehow have the Object thats put in the presigned URL to have a expiration time as well and not only the url.
@elpupper To clarify, do you mean that you want to adjust how long the presigned URL is good for, or do you want to set an expiry on the files uploaded?
But make sure you expand your function with lot's fo if/else/switch
To check if size after compression if it's still more then try a different percentage till you reach 80% or so to find the right fit but they is still possibilities of it passing but its narrow