It's all about the answers!

Ask a question

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


Aaron Cabrera (451418) | asked Sep 25 '17, 12:51 p.m.
closed Jun 05 '23, 4:22 a.m. by David Honey (1.8k17)

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?




Comments
Aaron Cabrera commented Oct 02 '17, 11:24 a.m.

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
Shashikant Padur (4.3k27) | answered Oct 05 '17, 6:50 a.m.
JAZZ DEVELOPER

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

Comments
Aaron Cabrera commented Oct 06 '17, 11:03 a.m.

Thank you for your response!

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


Aaron Cabrera commented Oct 12 '17, 3:21 p.m. | edited Oct 12 '17, 3:21 p.m.

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
Aaron Cabrera (451418) | answered Oct 18 '17, 2:08 p.m.
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.

Comments
Glyn Costello commented Jun 02 '23, 11:29 a.m.

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