Page 1 of 2

Where to get the attachment files

Posted: 11 Jan 2018, 14:27
by SunnyMantis
still on older version 1.1.7, if I want to see all the attachment files, which folder I should go check ?
I do have the access to the database (mysql)

still reply on a vendor to get data out of mantis, but not sure where they get the attachment if only given the database dump ?

we want to see how many files in mantis attachment in total, the number , then we can match the total we got from this vendor. so bad they didn't provide.

Re: Where to get the attachment files

Posted: 12 Jan 2018, 08:25
by atrol
You might have configured a global folder in file config_inc.php (setting $g_absolute_path_default_upload_folder), but you might also have configured individual folders for each project in project configuration (Manage Projects page).

Re: Where to get the attachment files

Posted: 17 Jan 2018, 17:14
by SunnyMantis
sorry, didn't get what you said yet; any other way to quick spot where the folder would be for attachment files ?

Re: Where to get the attachment files

Posted: 18 Jan 2018, 07:36
by atrol
SunnyMantis wrote:sorry, didn't get what you said yet;
Is it because of the instructions or is it because of English language?
German is my native language and I could use a translation tool to translate to your native language if it's not English.
SunnyMantis wrote:any other way to quick spot where the folder would be for attachment files ?
No

Re: Where to get the attachment files

Posted: 18 Jan 2018, 14:09
by SunnyMantis
No no no, not because of English, your English is perfect for me to understand. I just cannot find what you refer to.
Chinese (speaking mandarin) is my side of story :-)

the problem is the server not in my hand, I was given a folder and I will double check again to see what I can get from there.

Re: Where to get the attachment files

Posted: 18 Jan 2018, 14:34
by atrol
There is a file config_inc.php in the root folder of your Mantis installation on the web server.
You should search for $g_absolute_path_default_upload_folder in it.

Check also if someone set $g_file_upload_method in config_inc.php.
It should be something like "$g_file_upload_method = DISK;"
Your attachments are stored in database and not in any folder on file system if it's not set.

Re: Where to get the attachment files

Posted: 18 Jan 2018, 16:05
by SunnyMantis
Great! Let me work on that , of course , with others, too. Get back to you shortly.
Thank you soooo much ! Danke !

Re: Where to get the attachment files

Posted: 18 Jan 2018, 16:41
by SunnyMantis
finally, here is what I got in config_inc.php, so the attachments must be stored in database ? where then ?
<?php
$g_hostname =
$g_db_type = 'mysql';
$g_database_name = 'bugtracker';
$g_db_username =
$g_db_password =
$g_enable_email_notification = 'ON';
$g_smtp_host =
$g_administrator_email =
$g_from_email =
$g_webmaster_email =
$g_return_path_email =
$g_check_mx_record = 'OFF';
$g_priority_enum_string = '12:cosmetic,22:minor,32:medium,42:major,52:critical,62:show-stopper';
$g_severity_enum_string = '11:cosmetic.,21:minor.,31:medium.,41:major.,51:critical.,61:show-stopper.';
$g_default_bug_severity = '11';
$g_default_bug_priority = '32';

?>​

Re: Where to get the attachment files

Posted: 20 Jan 2018, 09:06
by atrol
SunnyMantis wrote: so the attachments must be stored in database ? where then ? ​
They are stored in mantis_bug_file_table, column content.

Re: Where to get the attachment files

Posted: 23 Jan 2018, 15:01
by SunnyMantis
so if we have the database sql (dump or export file) , we should be able to get all the attachment files ?
there is an argument between vendor and us, so I want to know the files can be restored just by database dump.

Re: Where to get the attachment files

Posted: 24 Jan 2018, 07:50
by atrol
SunnyMantis wrote:so if we have the database sql (dump or export file) , we should be able to get all the attachment files ?
Maybe, maybe not. As you have seen there are a lot of possible options and as this is Open Source, so you don't know if someone changed the standard behavior.

Why do you ask, ask, ask ... instead of getting the dump and check if the attachments are in it, or check it in current database instance?
No one can be able to answer your question with a clear "Yes" or "No" without having access to the system.

Re: Where to get the attachment files

Posted: 24 Jan 2018, 13:26
by SunnyMantis
Hi, yes, your idea was my action; however, we also dealt with another party who is managing the data migration, a vendor.
We have had issues regarding missing attachments after migration, i.e. my query for total attachment from database would be the baseline for us to compare.

Re: Where to get the attachment files

Posted: 25 Feb 2019, 20:43
by EstebanLB01
Hello all, quick question. I have configured my installation to use the database for the attachments (Not DISK), so the diskfile field is encrypted (I think), how can I know where the files are located?

Re: Where to get the attachment files

Posted: 26 Feb 2019, 06:50
by cas
see above:
They are stored in mantis_bug_file_table, column content.

Re: Where to get the attachment files

Posted: 27 Feb 2019, 15:11
by EstebanLB01
cas wrote: 26 Feb 2019, 06:50 see above:
They are stored in mantis_bug_file_table, column content.
Query: select * from bugtracker.mantis_bug_file_table

# id, bug_id, title, description, diskfile, filename, folder, filesize, file_type, content, date_added, user_id
'1', '1', '', '', '995e82d4fbd1d30f5dcbbe10f3ff1838', 'sadad.txt', '', '19', 'text/plain; charset=us-ascii', ?, '1551123434', '2'

These are the only columns on that table, Content column field is null. And how "Content" is relevant ot the file's path?