This repository has been archived by the owner on Apr 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
product images with same name overwrite previous image fix #99
Merged
magento-engcom-team
merged 3 commits into
magento-engcom:2.3-develop
from
umarch06:50-product-images-import-path-fix
Feb 28, 2018
Merged
product images with same name overwrite previous image fix #99
magento-engcom-team
merged 3 commits into
magento-engcom:2.3-develop
from
umarch06:50-product-images-import-path-fix
Feb 28, 2018
Conversation
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
dmanners
suggested changes
Jan 23, 2018
@@ -180,6 +180,7 @@ public function move($fileName, $renameFileOff = false) | |||
$filePath = $this->_directory->getRelativePath($this->getTmpDir() . '/' . $fileName); | |||
$this->_setUploadFile($filePath); | |||
$destDir = $this->_directory->getAbsolutePath($this->getDestDir()); | |||
$this->setAllowRenameFiles(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it would make more sense to see why the variable $renameFileOff
is false when passed into the method in this case. It looks like during the lines 152 we are setting the naming options as false.
if ($renameFileOff) {
$this->setAllowRenameFiles(false);
}
Please also take a look at the integration tests for this section of the system. |
@dmanners, probably I missed seeing the |
…g same name in other folder
- this is done as the image paths are now being rewritten and are already covered in the import/export tests
2f4aa9e
to
0c6120e
Compare
…ages contain the same name - when importing files with the same name will now be renamed for this reason we check names are similar now
magento-engcom-team
pushed a commit
that referenced
this pull request
Feb 28, 2018
magento-engcom-team
added a commit
that referenced
this pull request
Jul 24, 2018
- Merge Pull Request magento/graphql-ce#99 from magento/graphql-ce:96-compatibility-with-content-staging - Merged commits: 1. e79f381
magento-engcom-team
pushed a commit
that referenced
this pull request
Jul 24, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Images were not being renamed while uploading bulk products with images. For example, while importing images from paths a/b.jpg, b/b.jpg, c/b.jpg for three different products were overwriting the same file b.jpg in magento 2. I allowed to rename file if was already existed in Magento 2 catalog product folder. So there is no overwriting while uploading same image name with different folders.
Manual testing scenarios
Contribution checklist