Horje
decode multipart/form-data python lambda Code Example
decode multipart/form-data python lambda
import cgi
import io

def handler(event, context):
    print(event)
    print(event['body'])

    fp = io.BytesIO(event['body'].encode('utf-8'))
    pdict = cgi.parse_header(event['headers']['Content-Type'])[1]
    if 'boundary' in pdict:
        pdict['boundary'] = pdict['boundary'].encode('utf-8')
    pdict['CONTENT-LENGTH'] = len(event['body'])
    form_data = cgi.parse_multipart(fp, pdict)
    print('form_data=', form_data)




Python

Related
webdriver python get total number of tabs Code Example webdriver python get total number of tabs Code Example
root = tk() python 3 Code Example root = tk() python 3 Code Example
random 2 n program in python Code Example random 2 n program in python Code Example
fetch json array from mysql django Code Example fetch json array from mysql django Code Example
how to make a bot send whatever you dm it into a server discord.py Code Example how to make a bot send whatever you dm it into a server discord.py Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7