I need to process zip file. What I am doing is, in wizard, I created a field of type Binary like below
zip_file = fields.Binary("upload zip")
Now I need to use zip file uploaded in this file in my function.
for example.
from zipfile import ZipFile
my_zip_file = ZipFile(self.zip_file)
I am getting error (bytes object has no attribute seek)
I also tried
my_zip_file = ZipFile(io.BytesIO(self.zip_file))
I also tried
my_zip_file = ZipFile(io.BytesIO(self.zip_file).get_value())
Every time I get some error.
My question is:
How to convert this binary field as file like object?