i'm trying generate pre-signed url client can use upload image specific s3 bucket. i've succesfully generated requests files, so: generatepresignedurlrequest urlrequest = new generatepresignedurlrequest(bucket, filename); urlrequest.setmethod(method); urlrequest.setexpiration(expiration); where expiration , method date , httpmethod objects respectively. now i'm trying create url allow users put file, can't figure out how set maximum content-length. did find information on post policies , i'd prefer use put here - i'd avoid constructing json, though doesn't seem possible. lastly, alternative answer way pass image upload api gateway lambda can upload lambda s3 after validating file type , size (which isn't ideal). while haven't managed limit file size on upload, ended creating lambda function activated on upload temporary bucket. function has signature below public static void checkupload(s3eventnotification event) { (this nota...
Comments
Post a Comment