vinayseasia / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

File transfer thumbnail uses wrong content-type if the orignal file is not a jpeg #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Initiate a file transfer of a PNG image
2. image/png is used in Content-Type of the thumbnail attachment of INVITE 
message

What is the expected output? What do you see instead?
The created thumbnail is always a jpeg image in the code, so the Content-Type 
of the attachment should always be image/jpeg.
However, the code now sets it to the same content type of the original file.

What version of the product are you using? On what operating system?
2.5.13

Original issue reported on code.google.com by sam...@strumsoft.com on 22 Nov 2013 at 11:10

GoogleCodeExporter commented 8 years ago
Yes, you're right.
We will correct this for the next release.

Original comment by benoit.j...@gmail.com on 25 Nov 2013 at 9:38

GoogleCodeExporter commented 8 years ago
Corrected in next release V2.5.14

Original comment by benoit.j...@gmail.com on 25 Nov 2013 at 10:19

GoogleCodeExporter commented 8 years ago
This was not fixed.

In OriginatingFileSharingSession.run(), it's still adding the Content-Type of 
the thumbnail as
    ContentTypeHeader.NAME + ": " + encoding + SipUtils.CRLF
where "encoding" is the Content-Type of the file being sent, not the thumbnail 
image which is always "image/jpeg".
For example, if you try to send a PNG file, the thumbnail image will also have 
the "Content-Type: image/png".

(And I have made changes to attach video thumbnail, in that case if I didn't 
apply my fix, it would add "Content-Type: video/mp4" for the thumbnail image)

It's an easy fix for everyone, just replace "encoding" with "image/jpeg"

Original comment by sam...@strumsoft.com on 17 Apr 2014 at 2:18

GoogleCodeExporter commented 8 years ago
Has been fixed on the RCSJTA project (standard API).

See 
http://code.google.com/p/rcsjta/source/detail?r=fc436ec7d8d981f23f528998cf9ce217
077859c5&name=integration

Original comment by lemordan...@gmail.com on 12 May 2014 at 8:55