Twilio MMS Send Local File

前端 未结 2 543
旧时难觅i
旧时难觅i 2020-12-18 16:42

We can send MMS using Twilio api in Salesforce. As i know that using that code i can send MMS using Twilio in Salesforce.

Sending a MMS

properties.ad         


        
2条回答
  •  -上瘾入骨i
    2020-12-18 17:44

    Rajendra, hello! Megan from Twilio here.

    This sounds similar to what I ran into building an OpenCV MMS implementation in this blog post.

    The example there is in Python specifically, after writing an image to my local filesystem and making the desired modifications on it, I send it through:

    @app.route('/uploads/', methods=['GET', 'POST'])
    def uploaded_file(filename):
        return send_from_directory(UPLOAD_FOLDER,
                                   filename)
    

    which handles the delivery of the following TwiML:

     message.media('http://YourNgrokURL/uploads/{}'.format(filename))
    

    You'll be needing the equivalent of Flask's send_from_directory to handle this in your implementation.

    Hope this helps!

提交回复
热议问题