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

Add hash to asset on uploading the image to magento #1496

Closed
sivaschenko opened this issue Jun 18, 2020 · 2 comments · Fixed by #1510
Closed

Add hash to asset on uploading the image to magento #1496

sivaschenko opened this issue Jun 18, 2020 · 2 comments · Fixed by #1510
Assignees
Labels
Backend Priority: P2 Should be fixed as early as possible Progress: good first issue Good for newcomers
Milestone

Comments

@sivaschenko
Copy link
Member

sivaschenko commented Jun 18, 2020

Story: #1484

Preconditions (*)

  1. Install Magento 2.4-develop with ASI 2.0-develop
  2. Enable Enhanced Media Gallery

Steps to reproduce (*)

  1. Login to Admin panel
  2. Open the media gallery. I.e. from the Catalog -> Category -> Content fieldset -> Select image from gallery
  3. Click "Upload image" button and upload an image

Expected result (*)

The images information should be saved to the media_gallery_asset table. The hash filed should be populated with the sha1 hash of the image content

Testing

Should be checked for the next scenarios:

  • Uploading the image to the enhanced media gallery
  • Uploading the image to the old media gallery
  • Uploading the image to the category
  • Uploading the image to the Page builder
  • Runing bin/magento media-gallery:sync for images added manually to pub/media directory

Technical Details

The changes should be applied to \Magento\MediaGallerySynchronization\Model\CreateAssetFromFile::execute method

@m2-assistant
Copy link

m2-assistant bot commented Jun 18, 2020

Hi @sivaschenko. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@sivaschenko sivaschenko changed the title Add hash to asset on uploading the image to the enhanced media gallery Add hash to asset on uploading the image to magento Jun 18, 2020
@sivaschenko sivaschenko added this to the 2.1.0 milestone Jun 18, 2020
@sivaschenko sivaschenko added the Priority: P2 Should be fixed as early as possible label Jun 18, 2020
@Nazar65 Nazar65 self-assigned this Jun 19, 2020
@Nazar65 Nazar65 removed their assignment Jun 19, 2020
@joweecaquicla
Copy link

@magento I am working on this

joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jun 22, 2020
joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jun 24, 2020
…dded interface for sha1_file hashing and get content hash
@lenaorobei lenaorobei removed this from the 2.1.0 milestone Jun 26, 2020
joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jul 2, 2020
…emoved file encryption interface and changed from sha1 to sha1_file
joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jul 3, 2020
…nitial integration test file for GetContentHashInterface
joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jul 7, 2020
joweecaquicla pushed a commit to joweecaquicla/adobe-stock-integration that referenced this issue Jul 7, 2020
sivaschenko added a commit that referenced this issue Jul 8, 2020
…-uploading-the-image-to-magento

#1496: Add hash to asset on uploading the image to magento
@lenaorobei lenaorobei added this to the 2.1.0 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Priority: P2 Should be fixed as early as possible Progress: good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants