def upload_message_image_s3(uploaded_file_name, content_type, file_data, user_profile, target_realm=None):
    bucket_name = settings.S3_AUTH_UPLOADS_BUCKET
    s3_file_name = "/".join([
        str(target_realm.id if target_realm is not None else user_profile.realm.id),
        random_name(18),
        sanitize_name(uploaded_file_name)
    ])
    url = "/user_uploads/%s" % (s3_file_name)

    upload_image_to_s3(
            bucket_name,
            s3_file_name,
            content_type,
            user_profile,
            file_data
    )
    return url
dataset/ETHPy150Open zulip/zulip/zerver/lib/upload.py/upload_message_image_s3/original