adding logic for image attachments upload to s3