Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.2k views
in Q2A Core by
How i can store uploaded files and images in the  server and not in the DB ?
Q2A version: 1.7.3

1 Answer

+3 votes
by
Please follow the below way -

1. You need to enable this option first in your qa-config.php

https://github.com/q2a/question2answer/blob/dev/qa-config-example.php#L85

Like this -

define('QA_BLOBS_DIRECTORY', '/path/to/writable_blobs_directory/');

2. If there are already some BLOBs stored in the database from previous uploads, click the
    'Move BLOBs to disk' button in the 'Stats' section of the admin panel to move them to disk.
by
moved by

I'am not a programmer 

1 How i can enable this option in my config file 

2 - I must create a writable_blobs_directory    in root directory file  or what 

Please  anyone  can explain to me step by step please 


 

by
1. Do like Ami says here and put that QA_BLOBS_DIRECTORY line in your config.

2. The directory can be anywhere on your server. If you put for example a "files" folder in your site root, you can use:

define('QA_BLOBS_DIRECTORY', $_SERVER['DOCUMENT_ROOT'].'/files');

Then make it writable (chmod 777), you can do that via FTP.
...