You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import random
from pydal import DAL, Field
db =DAL()
db.define_table('x',
Field('name'),
Field('data', 'blob'))
random_data = ''.join(chr(random.randint(0,255)) for i in range(1000))
random_data = ''.join(random_data for i in range(100000))
print(repr(random_data[:100]))
id = db.x.insert(name="1", data=random_data)
row = db.x[id]
assert row.data == random_data
Crhis from the py4web forum brought this up:
Making more test when pydal retrieve the blob data from the db is only getting just a part of the information.
When in print the rows after the select i get a small sample like this:
images = cherry_db(cherry_db.image.node_id == i['node_id']).select(cherry_db.image.node_id, cherry_db.image.png)
for m in images:
print(m['png’])
b'<\xd1\x88\x1c4l\x04\x84\xce 0\x13\xc6\x01\r\xdd\xd0'
The text was updated successfully, but these errors were encountered: