![icons.png.png](https://lab.nexedi.com/Sokhoyan/erp5/-/raw/5e82e22ab4c8b7d818d7d544668f3c7f77b3baea/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_ckeditor/ckeditor/plugins/icons.png.png)
-
Jérome Perrin authored
done with an external method to upload the content of zip file in skin folder. import zipfile from io import BytesIO def uploadZip(self): dest = self.getPortalObject().portal_skins.custom with zipfile.ZipFile( '/srv/slapgrid/slappart3/srv/project/erp5/ckeditor_4.19.1_4b98d281bc34.zip' ) as f: for m in f.namelist(): current_dest = dest print(m) for part in m.split('/')[:-1]: if part not in current_dest.objectIds(): current_dest.manage_addProduct['OFSP'].manage_addFolder(id=part) current_dest = current_dest[part] fname = m.split('/')[-1] if fname == '_translationstatus.txt': fname = 'translationstatus.txt' current_dest.manage_addProduct['OFSP'].manage_addFile( id=fname, file=BytesIO(f.read(m))) return repr(dest)
5e82e22a
![icons.png.png](https://lab.nexedi.com/Sokhoyan/erp5/-/raw/5e82e22ab4c8b7d818d7d544668f3c7f77b3baea/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_ckeditor/ckeditor/plugins/icons.png.png)