store images in file system

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
croViking wrote:
Hi, I have an issue with this feature in 3.4

Well, long story short, no one changed the setting and now I have several thousand images in database.

I wisely backed up database and tried to change the setting.
Nopcommerce crashed due to OutOfMemory Exception (the load was too great for the worker process) and I ended up with a website not showing images.

After restoring the database, the images from db now load fine, but I still want to move them to filesystem.

Can I do it manually in more manageable chunks of data, like a 1000 at a time?


Hi,

You can use a little "hack" here and do the following. It will not require writing of custom export logic.

1. Make the setting to save the images in the database.

2. Backup your database.

3. Go to the pictures table and delete all records, except the first 1000.

4. Change the setting in the administration. This will find the 1000 left images in the table and will convert them into physical files.

5. Restore the database.

6. Repeat the procedure, but this time delete the first 1000 images and leave only the next 1000.


I hope this helped !
8 years ago
sachin4dotnet wrote:
In new version (I don't know from which version its changed but I am using 3.70), you can find that setting

Admin section > Configuration > Media Settings

    Pictures are stored into...:  database  

click on Change button


I am using 3.70, I did changed database to file system and save. But it still adding a value to binary field in the picture table. Even I deleted all the records from picture table, added new picture still the same.

Even I checked the all settings "Media.Images.StoreInDB" and it is set to false.

What is the folder name to store files?
8 years ago
dush01 wrote:

What is the folder name to store files?


Hi.
The folder is "~/content/images/".
7 years ago
Hi new nopcommerce user. I just installed 3.8 from scratch, changed to file system storage, and uploaded images in pages are not found, though everything else seems to work. My URL is localhost/appname. The URL on the page is coming back as localhost/Content/Images/uploaded etc. but the actual address should include the appname: localost/appname/Content...

I noticed I can set the path when I add the file, but shouldn't the app name just be there? Other uploaded content that doesn't reside in the "uploaded" folder, like the logo, are served with no problem.
7 years ago
Putting nopcommerce in the root of a new website fixed my path issue.
5 years ago
krimos wrote:
Hello !!



I have an advanced question : How does image file system works in NopCommerce ? Where can i find image URL field in database. Are pictures saved with thiers database picture id as file name ??
5 years ago
Nop-Templates.com wrote:
Hi, I have an issue with this feature in 3.4

Well, long story short, no one changed the setting and now I have several thousand images in database.

I wisely backed up database and tried to change the setting.
Nopcommerce crashed due to OutOfMemory Exception (the load was too great for the worker process) and I ended up with a website not showing images.

After restoring the database, the images from db now load fine, but I still want to move them to filesystem.

Can I do it manually in more manageable chunks of data, like a 1000 at a time?

Hi,

You can use a little "hack" here and do the following. It will not require writing of custom export logic.

1. Make the setting to save the images in the database.

2. Backup your database.

3. Go to the pictures table and delete all records, except the first 1000.

4. Change the setting in the administration. This will find the 1000 left images in the table and will convert them into physical files.

5. Restore the database.

6. Repeat the procedure, but this time delete the first 1000 images and leave only the next 1000.


I hope this helped !


I have DB with around 90k images, is this still usable, or is there any other way i could do it? Every time i try to change it in media settings it just goes to timeout after 10ish minutes...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.