markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.58k stars 1.01k forks source link

unable to create a media folder in root src directory in magento after csv upload #1184

Closed bhushanmeetanshi closed 4 months ago

bhushanmeetanshi commented 4 months ago

Description Hi i am unable to create media folder in magento docker (ubuntu)

Steps To Reproduce

  1. copy my vendor module folder in src/app/code directory
  2. execute bin/magento s:up command
  3. execute bin/magento s:s:d -f command
  4. execute bin/magento c:f command
  5. execute bin/magento s:d:c command
  6. goto the admin panel
  7. goto store configuration and goto vendor module
  8. generate a csv file in ./src/media folder
  9. check this path.

Expected Result Should able to create a directory in ./src/media/catalog/product/a/b/1.csv after executing all above steps.

Actual Result unable to create a media folder in root src directory in magento after csv upload using magento docker.

YevhenZvieriev commented 4 months ago

Hi, @bhushanmeetanshi

I guess you have created the catalog folder within src/media, and you can find it within the Docker container.

After generating your CSV files, ensure that the media directory exists within the Docker container executing the bin/cli ls script.

Ensure that the volume mappings in your compose.dev.yaml are correctly configured:

Add the line - ./src/media:/var/www/html/media:cached to the volumes section.

If you have any more questions, I will be happy to help you :)

bhushanmeetanshi commented 4 months ago

@YevhenZvieriev i have created the media directory in the src root but its not able to generated csv file from backend admin panel

bhushanmeetanshi commented 4 months ago

its create the csv in src/pub/media instead of src/media directory.

YevhenZvieriev commented 4 months ago

Do you expect to generate files in the src/media or src/pub/media?

Are you sure that the config path for generating in the CSV files is src/media?

bhushanmeetanshi commented 4 months ago

yes i have expected both but its based on backend configuration

If i have set yes option then it will generate in src/media path

If i have set No option then it will generate in src/pub/media path

bhushanmeetanshi commented 4 months ago

If i have set yes option then it will generate in src/media path. thats not working for me

If i have set No option then it will generate in src/pub/media path. its working for me as per your guidance.