Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] base_import: Import images,icon,logo all via URL.
Currently images must be imported one by one, unless we use a script, but it's too technical. it's especially annoying when deploying ecommerce apps with lots of products. Using this commit we can import images, via URL or base64 in the csv: * main image ( example product image) * several shop images (activate multi-image in ecommerce settings) * variant-specific image (activate variants) * Allow maximum 10mb size for images to import and only administrator can import image via url. used requests.session with stream=True which allow you to read large streams or files without reading them into memory. * set timeout default 3 seconds if requests will wait for your client to establish a connection to a remote. * added _can_import_remote_urls method to provide hook for trial/pack check in saas. * three parameter in tools config to set import image timeout, import image maxbytes and import image regex.
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters