Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
145 views
in Q2A Core by
Hi !

Images are being uploaded to database and web directory.

Example : define('QA_BLOBS_DIRECTORY', 'files');//

I tried changing web directory folder permission to 777 or 744 but it does same.

How can i upload images to directory only?

Thanks for your help.
Q2A version: 1.7.5

1 Answer

0 votes
by
Are you sure the content is being stored in the database? When you set Q2A to store files in a directory, it still uses the database to keep records of the files. The only difference is the image data itself is not stored in the database.
by
Hi Scott !

You are right. Files are stored in directory and database is keeping the record.  Content column in database says 'null' .

However

If i delete blob tables from database, images remain in directory but disappear from my site.

It means i should keep blob tables and directory files both at same time?

If i keep blob tables for images, would it increase the size of the database too much?

Thanks for your help.
by
How are you deleting the images from the database? There are various PHP functions in Q2A that you can use, I think it’s qa_delete_blob which should delete the file and database row.
...