[web2py] Re: html2canvas to db

2013-10-17 Thread Derek
I wouldn't recommend a 'GET' request, POST fits the use case better. No need to expose the entire image in the URL, as that gets written to the logs. I'd hate to have logs filled up with images. DB table should be fine, as the toDataURL gets the image as base64, If you need to get the file out,

[web2py] Re: html2canvas to db

2013-10-16 Thread IVINH
Try it: model: define_table("YOURTABLE",Field(data,"text")) controller: def update(): return db.*YOURTABLE*.insert(data = request.vars.data) Vào 17:27:14 UTC+7 Thứ bảy, ngày 12 tháng mười năm 2013, Ruud Schroen đã viết: > > I keep getting this error: GET > http://localhost:8000/ezwireframes

[web2py] Re: html2canvas to db

2013-10-12 Thread Ruud Schroen
I keep getting this error: GET http://localhost:8000/ezwireframes/wireframe/update/1?data=data%3Aimage%2Fp…BQpYBSsMrLbtEECBAgQIAAAQIECBAgQIAAAQI1C%2FwGTQp2HFGzKI0ASUVORK5CYII%3D

[web2py] Re: html2canvas to db

2013-10-11 Thread IVINH
You can try it: in view: function update() { var url = '{{=URL(f="update",args=request.args,vars=request.vars)}}'; var data = document.getElementById('drawcomment').toDataURL("image/png"); $.ajax({ url: url, type: "GET", data: {'data':data}, success: function (html) { $('#results').html(html); }