简体   繁体   English

Twilio Autopilot SMS 不接受媒体图像类型

[英]Twilio Autopilot SMS not accepting media image type

I wrote a task a while back that would run a collect flow and collect an image using the model on the docs for doing so (https://www.twilio.com/docs/autopilot/actions/collect#questions ).不久前我写了一个任务,它将运行收集流程并使用文档中的 model 收集图像(https://www.Z02641F076B0CC3A17A169366838/actions/collect.com#questions/docs/docslot.com It ran flawlessly, and I tested it to make sure it ran as expected.它运行完美,我对其进行了测试以确保它按预期运行。
I made a new account using the company email to migrate my work over, and continue implementing the code, and eventually reached the portion where I needed to integrate that media collection.我使用 email 公司创建了一个新帐户来迁移我的工作,并继续实施代码,最终到达了我需要集成该媒体集合的部分。 I used the same code, but it didn't work.我使用了相同的代码,但它不起作用。 The collect flow keeps on triggering the validate portion and telling me that it isn't an accepted type.收集流程继续触发验证部分并告诉我它不是可接受的类型。 I have tried it using the exact code from before as well as the exact image, but it still isn't working.我已经使用之前的确切代码以及确切的图像进行了尝试,但它仍然无法正常工作。 The only thing I can think of is if the phone number was set up differently somehow.我唯一能想到的是电话号码是否以某种方式设置不同。 The message logs show the image as sent and looks fine and I can't find any differences other than that.消息日志显示图像已发送并且看起来很好,除此之外我找不到任何差异。
Is there anything that might be causing this?有什么可能导致这种情况吗? Here is the code for reference这是供参考的代码

{
    "actions": [
        {
            "collect": {
                "name": "image_collect",
                "questions": [
                    {
                        "question": "Please upload an image",
                        "name": "image",
                        "type": "Twilio.MEDIA",
                        "validate": {
                            "on_failure": {
                                "messages": [
                                    {
                                        "say": "We do not accept this format. Please send another image."
                                    }
                                ]
                            },
                            "allowed_types": {
                                "list": [
                                    "image/jpeg",
                                    "image/gif",
                                    "image/png",
                                    "image/bmp",
                                    "application/pdf"
                                ]
                            }
                        }
                    }
                ],
                "on_complete": {
                    "redirect": "https://4894-100-33-3-193.ngrok.io/image_processing"
                }
            }
        }
    ]
}

Generally, media size causes this issue, just make sure the file size is within the limits.通常,媒体大小会导致此问题,只需确保文件大小在限制范围内即可。

For more info - https://www.twilio.com/docs/sms/accepted-mime-types欲了解更多信息 - https://www.twilio.com/docs/sms/accepted-mime-types

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM