View Issue Details

IDProjectCategoryView StatusLast Update
0017162mantisbtdb mssqlpublic2016-07-11 15:54
ReporterSamCPP Assigned To 
Status newResolutionsuspended 
PlatformMicrosoftOSWindowsOS VersionWin7 x64
Product Version1.2.17 
Summary0017162: Downloading attachment doesn't work

Using MSSQL database, uploading a PNG attachment with files set to save on database, the file appears to be stored in binary in the DB correctly.

However on download, a hex encoded string is stored in the output file with leading "0x".

Steps To Reproduce
  1. Upload PNG to an issue.
  2. Right-click on link and save link as and save to local.
  3. Try to open downloaded file.
TagsNo tags attached.




2014-04-06 06:50

reporter   ~0039831

Correction to issue report. Can confirm the file is actually stored in the database incorrectly rather than the download saving incorrectly. Can't seem to be able to edit the issue description to correct this.



2014-04-06 07:09

reporter   ~0039833

After altering the 'content' column to varbinary(max), on MSSQL2008+, this should work to correct the DB data then the attachments should download correctly.

UPDATE [mantis_bug_file_table]
SET content = CASE WHEN SUBSTRING(CONVERT(VARCHAR, content), 1, 2) = '0x'
ELSE content END



2014-04-06 07:12

reporter   ~0039834


At the moment, mssql support is broken - I use mssql support at work.

We are hoping to get the DB layer replaced over next month to provide support for oracle/mssql/pgsql, and test it properly

Marking this as suspended for now



2014-05-16 15:00

reporter   ~0040334

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.


Issue History

Date Modified Username Field Change
2014-04-06 06:46 SamCPP New Issue
2014-04-06 06:50 SamCPP Note Added: 0039831
2014-04-06 07:09 SamCPP Note Added: 0039833
2014-04-06 07:12 grangeway Note Added: 0039834
2014-04-06 07:12 grangeway Status new => resolved
2014-04-06 07:12 grangeway Resolution open => suspended
2014-04-06 07:12 grangeway Assigned To => grangeway
2014-04-06 11:01 atrol Status resolved => assigned
2014-04-12 19:08 grangeway Target Version => 1.3.0-beta.1
2014-05-16 15:00 grangeway Note Added: 0040334
2014-05-23 15:09 grangeway Project mantisbt => @24@
2014-11-07 14:40 atrol Assigned To grangeway =>
2014-11-07 14:40 atrol Status assigned => new
2014-11-07 14:40 atrol Project @24@ => mantisbt
2014-12-08 02:10 atrol Target Version 1.3.0-beta.1 => 1.3.0-beta.2
2015-03-15 20:00 dregad Target Version 1.3.0-beta.2 => 1.3.0-beta.3
2015-09-06 17:47 vboctoradmin Target Version 1.3.0-beta.3 => 1.3.0-rc.1
2015-12-06 02:55 vboctor Target Version 1.3.0-rc.1 => 1.3.0-rc.2
2016-06-12 02:37 atrol Target Version 1.3.0-rc.2 => 1.3.0
2016-07-10 07:57 atroladmin Target Version 1.3.0 => 1.3.1
2016-07-11 15:54 atrol Target Version 1.3.1 =>