Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

[closed] How to address unsupported MIME types in RTC Code Review functionality?

We are using RTC 6.0.2 and are implementing Code Review functionality.

A few issues:
1. Seems like a number for the file extensions are not recognized as valid types (.js, .css, .jsp)
2. For some of the larger files that fit into the unsupported mime types, it is super slow to load up the code review comparison screen, to the point that the browser asked if we wanted to kill the long running script.

A comment from one of our users:

filename1.js is an example of a long loading file.  It is just over 1K lines long and crushes the browser.  By comparison, filename2.java does not get the invalid MIME type warning and as 3600 lines of code and loads quickly.



How do we resolve these issues?



1 vote

Comments

The exact message we get in the web client when doing a code review of java script files is:

The MIME type of this file is currently not supported by Code Review.  Do you still wish to show this file?


The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Jun 05 '23, 4:22 a.m.

Accepted answer

Permanent link

There were a number of file extensions that were added (including the mentioned .js, .css, .jsp) in the ongoing 6.0.5 release.

With respect to the loading time, I believe the Orion editor maybe causing this issue. Please raise a defect. 

David Lafreniere selected this answer as the correct answer

1 vote

Comments

Thank you for your response!

Does that mean that code review is not configurable and we need to wait for updates?

Is it possible to get a list of supported file types in each of the 6.x versions (6.0.2, 6.0.3, 6.0.4 and 6.0.5)


One other answer

Permanent link
A response from IBM:

Hi Aaron,

I had a chance to discuss this PMR with my colleagues and was able to find out some more information for you, please see below:

Application/javascript is a supported content type in RTC 6.0.2 so it should not show as unsupported MIME type warning message for javascript files. It should be noted that a file name having extention as .js can have any MIME type like plain/text, application/javascript or application/unknown etc. We believe that the javascript file that you're using has application/unknown as MIME type and that is why it's showing an unsupported MIME type warning message.

We ran a test in RTC 6.0.2 with two javascript files each having 10K lines. One of the javascript file was an application/javascript MIME type while other was of application/unknown MIME type. Both the files took 2-3 seconds to load. 

Lastly, the following is a list of supported MIME types for various RTC releases:

For 6.0.2, 6.0.3 and 6.0.4 :
"text/x-java-source";
"application/xml";
"application/javascript";
"text/html";
"text/x-csharp";
"text/x-csrc";
"text/x-c++src"; 

For 6.0.5, (the list is picked up from Orion V15 supported MIME Type)

"text/plain"
"application/javascript"
"application/vnd.coffeescript",
"text/jsx",
"text/html",
"text/css",
"text/x-scss",
"text/x-less",
"application/json",
"application/sql",
"application/xml",
"application/x-ejs",
"text/x-java-source",
"application/x-jsp",
"application/x-sh",
"text/x-jade",
"text/x-python",
"text/x-ruby",
"text/x-go",
"text/x-launch",
"text/x-objective-c",
"text/x-php",
"text/x-properties"
"text/x-smarty",
"text/x-swift",
"text/x-typescript",
"text/x-markdown",
"text/x-yaml",
"text/conf",
"application/browser-renderable",
"application/pdf",
"application/octet-stream",
"application/zip",
"text/x-arduino",
"text/x-csrc",
"text/x-csharp",
"text/x-cshtml",
"text/x-dockerfile",
"text/x-erlang",
"text/x-haml",
"text/x-lua",
"application/xquery",
"text/x-vb",
"text/x-vbhtml",
"image/gif",
"image/jpeg",
"image/ico",
"image/png",
"image/tiff",
"image/svg",

I hope this answers your question, please let me know how you'd like to proceed with this PMR.

0 votes

Comments

Is there any way I can leverage these added MIME types in Code Review to apply to MS Office type files or PDFs? At the moment, if I try and put a PDF into Code Review, it just shows as garbled text

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,117
× 3

Question asked: Sep 25 '17, 12:51 p.m.

Question was seen: 4,582 times

Last updated: Jun 05 '23, 4:22 a.m.

Confirmation Cancel Confirm