How to import Asset files into Adobe Commerce
Since the 100.6.0 version of the Akeneo Connector for Adobe Commerce, you can import files from assets into Adobe Commerce.
File import from Assets is only available for Akeneo version 4.0 or superior
Connector parameter | Adobe Commerce information |
---|---|
Import New File Asset | Yes or No |
If set to no, no new files will be downloaded but the already imported attributes won't be erased.
All files will be downloaded in the 'pub/media/akeneo_connector/asset_files/' folder
Connector parameter | File Asset Collection Attribute |
---|---|
Akeneo Asset Manager File Attributes | List your Akeneo PIM File Asset Collection attribute codes |
As Adobe Commerce cannot handle file upload attributes, the connector will download Akeneo asset files and insert the link into the attribute, formatted as JSON.
JSON example:
{
"asset_file_1": "akeneo_connector/asset_files/f/i/file-1.pdf",
"asset_file_2": "akeneo_connector/asset_files/f/i/file-2.pdf"
}
The connector will only import asset files with a main media of the media type "PDF" or "Other".
The connector will import asset files from both media file and media link attributes.
The localizable and scopable dimensions of your Akeneo Asset Collection File attribute and the Akeneo Asset Family main media attribute will be automatically managed by the connector.
Since the 100.6.0 version of the Akeneo Connector for Adobe Commerce, the connector will transform asset collection attributes to text areas in Adobe Commerce in order to handle JSON content for asset collection file attributes.
If you already imported an asset collection file attribute before upgrading the connector to version 100.6.0, you will have to delete the previously imported attribute and import it again in order to transform it into a text area.
Since the 101.0.2 version of the Akeneo Connector for Adobe Commerce, the connector manages the prefix and the suffix defined on the main media attribute of your Akeneo file asset family.
Prefixes and suffixes are only available for external media link attributes.
Since the 101.6.0 version of the Akeneo Connector for Adobe Commerce, you can import all attributes from files assets family into Adobe Commerce when enabling the following parameter:
Connector parameter | Adobe Commerce information |
---|---|
Enable Download of All File Asset Attributes | Yes or No |
If set to yes, the JSON format will become:
{
"asset_file_1": {
"label": "File 1",
"file": "akeneo_connector/asset_files/f/i/file-1.pdf",
"description": "File 1 description",
"tags": "Tag 1"
},
"asset_file_2": {
"label": "File 2",
"file": "akeneo_connector/asset_files/f/i/file-2.pdf",
"description": "File 2 description",
"tags": "Tag 2"
}
}
Connector parameter | Adobe Commerce information |
---|---|
Download Akeneo External File Asset Link | Yes or No |
This parameter allows you to choose whether to locally download or not the Akeneo file assets with the media type "Media Link".
If set to No, the Akeneo file asset links will be added to the JSON.
If set to Yes, the Akeneo external file assets will be downloaded to Adobe Commerce and the local path will be added to the JSON. Also, if set to Yes, the Akeneo External File Asset Link Download parameter will be displayed.
Setting this option to Yes might affect the performance of the import due to the downloading time of the Akeneo file assets.
Connector parameter | Adobe Commerce information |
---|---|
Akeneo External File Asset Link Download | Always download all assets or Download only assets with different filename |
As it is not possible to detect that an external file has been modified, this parameter allows you to choose between two download modes for assets with a main media attribute of "Media Link" type:
-
Always download all assets: This option will always download all assets with an external media link.
- This option will handle any changes on your external assets but might slow down your imports.
-
Download only assets with different filename: This option will not download previously downloaded assets from an external media link based on their filename.
- This option will not be able to import an external asset that has been modified but that keeps the same filename than a previously imported asset.