Open tobiasherp opened 5 years ago
@hvelarde we really need this. See:
I think adding the dependency just because of this function is not optimal. The function is pretty simple, and depends only on the base64 module from the stdlib:
def b64decode_file(value):
if isinstance(value, six.text_type):
value = value.encode('utf8')
filename, data = value.split(b';')
filename = filename.split(b':')[1]
filename = base64.standard_b64decode(filename)
filename = filename.decode('utf-8')
data = data.split(b':')[1]
data = base64.standard_b64decode(data)
return filename, data
I'd rather duplicate the function.
Just my 2 cents.
@rafaelbco it's not just because of the function. The widget is also used:
... because of the
b64decode_file
function.