Skip to content

Conversation

@VincentMarmiesse
Copy link
Contributor

When a category image is imported, it's saved without the media/catalog/category path.

For instance, if I import a main.jpg image, it will be saved as /m/a/main.jpg, causing a 404 when the image is displayed.

I'm not sure if it's the cleanest way to do it tho.

try {
$res = $this->getUploader()->move($fileName);
return $res['file'];
return '/media/catalog/category' . $res['file'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is rather strange that this is needed as this should be handled already:

$destinationDir = "catalog/category";
$destinationPath = $dirAddon . $DS . $this->mediaDirectory->getRelativePath($destinationDir);
$this->mediaDirectory->create($destinationPath);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not on my side, could you try?
This is what I have:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants