Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
2.6k views
in Q2A Core by
retagged by
I cannot find the postings... I just found the "buttons" graphics: http://www.question2answer.org/qa/24390/tips-upload-file-management-with-v1-6

I'd like to activate and test the feature upload image to server instead database - where is it?

it must be somewhere...
Q2A version: 1.6.2

3 Answers

0 votes
by
That info was kind of hidden!

"New BLOBs (avatars, uploaded files) can be stored on disk rather than in the database - see QA_BLOBS_DIRECTORY in qa-config-example.php. It's OK if some old ones are in the database and some new ones on disk. Uploaded files can be migrated between disk and database on the admin/stats page."

from http://www.question2answer.org/qa/19647/question2answer-1-6-progress?show=19647#q19647
–3 votes
by

The destination of uploaded images is selected automatically by existing data state of qa_blobs table. Therefor, there is no option said well in the admin panel. Lower buttons are equivalent to it if I say daringly. Because they are displayed exclusively, two buttons are the same as checkbox.

  • admin > stats > "Blobs to disk" 
  • admin > stats > "Blobs to database" 

One point:
When you enable QA_BLOBS_DIRECTORY of qa_config.php in empty state of qa_blobs, uploaded images are saved in the file system, not qa_blobs.

by
Thanks sama55, editing the qa-config.php solved it.
+5 votes
by

Define the constant in qa-config.php as below

define('QA_BLOBS_DIRECTORY', 'media'); // here media directory is on your q2a root.

Do not use / if it is on the root

by
Thanks, that solved it. I think there should be an information in the admin panel. This is an essential one! =)
by
it works perfectly! mho this should be the default mode
by
Please help me resolve this error by locating the file on which the code get saved.

http://www.question2answer.org/qa/33284/cannot-changes-after-updating-java-script-custom-side-panel
by
how to you migrate back to storing blobs in database?
...