Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store on Sylius the original file name of a media on Akeneo #111

Open
LucaGallinari opened this issue Dec 16, 2021 · 1 comment
Open

Store on Sylius the original file name of a media on Akeneo #111

LucaGallinari opened this issue Dec 16, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@LucaGallinari
Copy link
Member

Actually, an attribute with Akeneo type "pim_catalog_file" is imported by downloading the file and storing in the related Sylius text attribute the path of the downloaded file.
It could be useful to also store the "original_filename" data of the media file.
API reference, section "GET A PRODUCT MEDIA FILE": https://api.akeneo.com/api-reference-23.html

@lruozzi9
Copy link
Member

You could rapidly retrieve it from the Sylius path file with something like that:

$fileName = substr($path, strpos($path, '_') + 1);

Where $path is the full hashed path generated by the importer.

@LucaGallinari LucaGallinari added the enhancement New feature or request label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants