Media is an important part of Product information be it images or PDFs etc.
Akeneo saves uploaded files and other temporary files in the predefined location like /tmp directory.
Change file storage directory in Akeneo
A user can change the file storage location by changing the following parameters in the project configuration.
goto /app/config/parameters.yml file.
Add following parameters in file to change upload and temp file storage directory.
parameters: catalog_storage_dir:'/path/to/pim/pim-community-standard/tmp/pim/catalog_storage' # for main product file storage tmp_storage_dir: '/path/to/pim/pim-community-standard/tmp/pim/file_storage' # for temporary storage for import profiles upload_tmp_dir: '/path/to/pim/pim-community-standard/tmp/pim/upload_tmp_dir' # for uploaded files asset_storage_dir: '/path/to/pim/pim-community-standard/tmp/pim/file_storage/asset' # only for enterprize_edition pam
Better Alternative:
I do not recommend keeping files on the same server as the application.
because Increasing file storage on the server requires monitoring. it can halt your application and services.
so better alternative would be to use some file storage CDN like amazon s3 for saving files. it is better both for usability and security.
In case of Akeneo user can plugins like https://store.webkul.com/akeneo-amazon-s3-integration.html
Product images/files as well data from PAM (product asset management) could be stored on CDNs like Amazon s3.
3 comments
Change file storage directory in Akeneo 4
You can change the file storage location by changing the file parameters in the project configuration.
goto in the directory config/packages and create a new file change_filesystem.yml.
First, you need to edit the file change_filesystem.yml
After then add the following parameters.https://prnt.sc/v6isim
oneup_flysystem:
adapters:
catalog_storage_adapter:
local:
directory: ‘%kernel.project_dir%/var/file_storage/catalog’
jobs_storage_adapter:
local:
directory: ‘%kernel.project_dir%/var/file_storage/jobs’
archivist_adapter:
local:
directory: ‘%kernel.project_dir%/var/file_storage/archive’
You can change the file storage directory instead of the /var/file_storage/catalog
If you want to change the jobs storage data like export/import CSV files you can change the /var/file_storage/jobs directory.
or, if you want to change the export/import CSV archive (zip) files path you can change /var/file_storage/archive
After changing the directory path you need to clear the cache to apply the changes.
rm -rf var/cache && php bin/console cache:warmup
For other queries, please send us an email at [email protected]