Where to get the attachment files

Get help from other users here.

Moderators: Developer, Contributor

SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Where to get the attachment files

Post 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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Where to get the attachment files

Post 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).
Please use Search before posting and read the Manual
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post by SunnyMantis »

sorry, didn't get what you said yet; any other way to quick spot where the folder would be for attachment files ?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Where to get the attachment files

Post 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
Please use Search before posting and read the Manual
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post 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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Where to get the attachment files

Post 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.
Please use Search before posting and read the Manual
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post by SunnyMantis »

Great! Let me work on that , of course , with others, too. Get back to you shortly.
Thank you soooo much ! Danke !
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post 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';

?>​
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Where to get the attachment files

Post by atrol »

SunnyMantis wrote: so the attachments must be stored in database ? where then ? ​
They are stored in mantis_bug_file_table, column content.
Please use Search before posting and read the Manual
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post 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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Where to get the attachment files

Post 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.
Please use Search before posting and read the Manual
SunnyMantis
Posts: 60
Joined: 03 Jan 2018, 15:39
Location: Toronto, Canada

Re: Where to get the attachment files

Post 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.
EstebanLB01
Posts: 6
Joined: 19 Feb 2019, 19:19

Re: Where to get the attachment files

Post 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?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Where to get the attachment files

Post by cas »

see above:
They are stored in mantis_bug_file_table, column content.
EstebanLB01
Posts: 6
Joined: 19 Feb 2019, 19:19

Re: Where to get the attachment files

Post 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?
Post Reply