Fisheye renders binary file in SVN repository as text
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
When viewing a binary file stored in an SVN repository, the Source or Diff windows will show an ASCII rendering of the file.
Diagnosis
Environment
This only happens with SVN repositories
Diagnostic Steps
Obtain a copy of the original file which is not showing properly.
Test in a local repository.
Cause
Per SVN Red Book: Automatic Properties if the SVN properties are not manually set on a file, SVN will try to auto-detect the file type. The auto-detection algorithm will sometimes fail, causing SVN to default set the property svn:mimetype
type to blank, and assume the file is text.
Solution
Resolution
Manually set the MIME type for the file.
For a list of all MIME types, please refer to The Complete List of MIME Types
1
svn propset svn:mimetype MIME_TYPE FILE_NAME
Replace MIME_TYPE with the official type (e.g. application/pdf) and FILE_NAME with the name of the file in the repository
Was this helpful?