https://github.com/sergiomb2/MultipartPostHandler2
MultipartPostHandler needs to identify type of variables as file, I got a string with an image
Now I do : 
outfile = open(tmpfile,'w')
outfile.write(img)
outfile.close()
params = { 'img': open(tmpfile, "rb"), ...
but seems to me a workaround, have to write file in File System , I'd like to know how I create a file descriptor with a buffer with content of img variable . I tried StringIO but stringIO isn't of type file
for(key, value) in params.items():
    if type(value) == file:
        v_files.append((key, value))
give me cStringIO.StringI and don't have fileno
for(key, fd) in files:
    file_size = os.fstat(fd.fileno())[stat.ST_SIZE]
    filename = fd.name.split('/')[-1]
doesn't work
 
    