'Helper function to create filestream for upload.
Parameters :
strData : str, test string data
Optional Arguments :
filename : str, Defaults to \'test.txt\''

def _create_gif_filestream_from_base64(self, str_base64, **kwargs):

    filename = kwargs.get(u'filename', u'test.gif')
    data = base64.b64decode(str_base64)
    filedata = BytesIO(data)
    filestream = InMemoryUploadedFile(filedata, None, filename, u'image', len(data), None)
    return filestream
