Sorry if this question is dumb. I converted a jqplot image to data-url and send it with a form. In the new page, I used cgi.FieldStorage()
to get the submitted data-url, but got nothing. So could anyone give me some suggestions on my approach? Thanks!
I am using Python on Google App Engine
Input page Javascript
var imgData = $('#chart1').jqplotToImageStr({});
$('<tr style="display:none"><td><input type="hidden" name="extract1"></td></tr>')
.appendTo('.getpdf')
.find('input')
.data(imgData);
Output page:
def post(self):
form = cgi.FieldStorage()
extract1 = form.getvalue('extract1') #extract1 is empty
I tried to print the form and it looked as:MiniFieldStorage('extract1', '"data:image/png;base64,iVBORw0KGgoAAAANSUhE
If I assigned the data-url (data:image/png;base64,iVBORw0KGg...), it worked.