The problem with the Firebird adapter is that it inserts blobs as base64 strings directly in an INSERT statement instead of using the stream mechanism that Firebird provides. There's a reported bug about this: https://github.com/web2py/web2py/issues/666. At this time, there's no workaround.
On Monday, May 14, 2018 at 8:56:43 AM UTC-6, Nico de Groot wrote: > > I added blob to the fieldname because in my code DAL checks for reserved > SQL names. DATA is not allowed in some databases > > Op zo 13 mei 2018 om 11:39 schreef Константин Комков <[email protected] > <javascript:>> > >> Nico de Groot, thank you for example and attention! I already have crud >> form and that form work. It load files in folder 'uploads'. I want to save >> that files in database now. I sure that >> stream=open(filepath + '\\' + i.file, 'rb') >> and >> stream.read() >> made a long base64 string because I saw it on site. Then I decoded it and >> got picture. >> Also I tried to save that file as usual SQL request in Firebird and >> web2py interfaces, where field DATA conteined string in base64. Like that: >> INSERT INTO bin_files (PARENT, SRC_FILENAME, DATA) VALUES >> (33,'name.jpg','very >> very long base64 string'). >> After that Firebird has hanged. Web2py given an error message. >> Just in case, are there between names 'DATA' and 'DATAblob'? >> Yesterday and today I can't test all again because it's day off. >> Raul Monares, thank you too! I cheked file that contain string in base64 >> and it's sise 440kb. It's more then size of file in the beginning (name.jpg >> - 322kb). What should I do in that case, after all blob field can store >> large files. >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/_MVVu9PF0xk/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

