I’ve been running Sonatype Nexus Repository Manager version 3.12 to manage built artifacts. When the artifacts are uploaded to the Nexus, they are set the mime type of application/octet-stream. this is good and what I expected.
The thing that bothers me the most is that the default USED to be “application/octet-stream”, but now it’s text/plain, and there’s no way of specifying it or changing it through the UI. I am going to have to go into the raw blobstores on the disk and modify the properties file manually to get them to be fixed.
Usually fundamental changes like this aren’t made on a minor update. these types of changes are major-release level changes.
It’s a proprietary extension and binary format that’s not going to be in any list. The extension is .2gig, and the file is a firmware load for an embedded linux device.
however, it does the exact same thing to .bin files. I have a binary .bin file that in Nexus 3.12 uploads as a “application/octet-stream”, but the exact same file (same sha1sum) uploads as “text/plain” in 3.16.
This has cost me an entire day. I’m going to attempt to roll back to 3.12. I’ll live with the security flaw if it means the system uploads files and detects the content type properly. I can’t believe there isn’t a way to specify the content type for unknown file extensions.
Can’t roll back from 3.16 to 3.12 because the database has been updated somehow. When starting, I get about 300 lines of exceptions trying to open sonatype-work/nexus3/db/componenet
2019-06-19 08:55:25,103-0600 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage ‘/opt/sonatype-work/nexus3/db/component’ with mode=rw
DB name=“component”
being that nexus is supposed to be an artifact repository manager, is there any way to add custom file extensions and mime types? if not, that seems like a major oversight.
There is a hack you could try… it worked here. Open up the “nexus-3.16.2-01/system/org/sonatype/nexus/nexus-mime/3.16.2-01/nexus-mime-3.16.2-01.jar” file, and edit the “builtin-mimetypes.properties” file. Add a line like this into it:
xyz = application/octet-stream
The above sets the download mime type for extension “xyz”.