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

Saving pictures to a directory on disk to specific subdirectory #7380

Open
bambuca opened this issue Oct 24, 2024 · 0 comments
Open

Saving pictures to a directory on disk to specific subdirectory #7380

bambuca opened this issue Oct 24, 2024 · 0 comments

Comments

@bambuca
Copy link

bambuca commented Oct 24, 2024

nopCommerce version: 4.70

Currently, images (products, categories, etc.) are stored either in the database or on disk (according to "Media.Images.StoreInDB" setting).
If they are stored on disk, they are saved directly into the “images” directory. We have the application running in Docker, where we already have volumes set up for the directories “images/thumbs” and “images/uploaded”. Product images are currently stored in the SQL database.

We would like to store these images on the filesystem as well, but they will be stored directly in the “images” directory. We don’t want to create a volume for the entire “images” directory because it contains subdirectories like “flags”, which we don’t want to include in the volume.

As a possible solution, I thought of:

  1. Saving images into the subdirectory, fe “images/pictures”.
  2. Adding a setting in the configuration where the name of the subdirectory can be specified, e.g., "Media.Images.Subfolder", which by default would be empty (so backward compatible) but could be adjusted to the desired value.
@AndreiMaz AndreiMaz changed the title Enhancement: Saving Pictures to a Directory on Disk to specific subdirectory Saving pictures to a directory on disk to specific subdirectory Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants