Twilio MMS Send Local File

前端 未结 2 539
旧时难觅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条回答
  • 2020-12-18 17:37

    You can use twilio assets for sending local files. - First you need to upload the local files on twilio assets. - use the assets url and media url for sending Mms

    0 讨论(0)
  • 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/<filename>', 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!

    0 讨论(0)
提交回复
热议问题