5 Jun
2003
5 Jun
'03
8:20 p.m.
drew nichols wrote at 2003-6-5 09:40 +1000:
... base64.encode (file, body)
This works fine with no encoding and text data, but binary data needs encoding. encode64 will not encode as the zope file has no read() method. Should i write my own wrapper class, or is there a simpler way??
If your files are not too large, you can use "encode_string" and convert the "file" into a string with "str(file.data)". Dieter