It's all about the answers!

Ask a question

Why is mime-type different for the same attachment for web and eclipse clients of RTC ?

Atul Kumar (1872329) | asked Mar 04 '15, 6:57 a.m.
edited Mar 04 '15, 6:58 a.m.
I attached a file with .ini extension from RTC web client, the mime type it had was "application/octet-stream".

I attached the same file from RTC eclipse client, the mime type was given "application/unknown".

Due to this behavior, my application is behaving erratically.

Any pointers ?

PFA screenshot - mime-discripancy

One answer

permanent link
Evan Hughes (2.4k1318) | answered Mar 04 '15, 2:31 p.m.
MIME types in the Eclipse client are governed by the Eclipse type registry. You can override that in the Eclipse preferences by going to Team > Jazz Source Control > File Properties. 

Atul Kumar commented Mar 05 '15, 12:43 a.m.

And what about the Web client? How does the web-client determine mime-type when an attachment is uploaded?

In my application also there is a provision to upload attachments from file system or fromĀ  RTC-workitem-attachments.

For the attachments from file-system, I use this - URLConnection.getFileNameMap().getContentTypeFor(file.getName());

For RTC-workitem-attachments, I use IAttachment's content-type. But even within this, I found differences for web/eclipse clients.

Just want to find a consistent way to avoid this situation in my application.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.