This content originally appeared on DEV Community and was authored by tim bennett
I have a small web page for my pigeon club. I use Twilio to send 1 direction messages. I want to be able to send a pic to the Twilio number and forward to multiple numbers. I can receive the message but do not know how to forward the image from my message. Any help would be great.
`@csrf_exempt
def mms_reply(self):
Bodyx = self.POST.get('Body')
response = MessagingResponse()
if Bodyx =='1':
msg = response.message("Gotta love a GIF!")
else:
msg = response.message("Sorry you cannot reply to this number")
from_number = self.POST.get('From', '')
#msg = response.message(from_number)
med=self.POST.get('MediaUrl[0]')
msg = response.message(str(med))
med=self.POST.get('NumMedia')
msg = response.message(str(med)+' NumMedia')
msg.media("../static/pigeonpic.jpg")
#media_link=medx
#msg.media(media_link)
return HttpResponse(str(response))
#return HttpResponse(str(Bodyx))
#../static/pigeonpic.jpg`
This content originally appeared on DEV Community and was authored by tim bennett
tim bennett | Sciencx (2024-06-25T15:09:26+00:00) DEjango twilio mms fowarding. Retrieved from https://www.scien.cx/2024/06/25/dejango-twilio-mms-fowarding/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.