more changes on s3 image upload in resource