-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determining extension of message content #23
Comments
I've created an example fix in pull request #24. If you think that is the way to go, please do merge. |
Thank you for your suggestion and a patch. Looks cool! However, I think it doesn't have to limit to How do you think? |
@samwierema ping |
Yes, I think that might be helpful, although I can't necessarily tell why all headers are needed. Would you then also have methods for each header, or would you access them in a different way? |
Thank you. |
Yes, perfect. If you need any further input or feedback, let me know. |
I copy. |
Version 1.1.0 supports such functions! |
When retrieving the content of a message (e.g. an image) it can not be determined, using the SDK, whether the image (or any other content) is of a given mime type (e.g.
image/jpeg
,image/png
). This makes it hard to actually write the file to disk with the right extension.Here's some example code that shows the issue:
There's various solutions to the issue:
HTTPClient
with agetMimeType()
method, but since it's a private member of theLINEBot
class, I can't access this in the code.Response
class, but that just seems to much overwriting already.ImageMessage
class (if sent back from the API)In the
KitchenSink
example all images are written as.jpeg
so it could be that all images are actually JPEG's, but that is not documented.Could someone provide some guidance to the above? I can make a pull request based on suggestion and/or feedback, but looking to see what the right way to go is.
The text was updated successfully, but these errors were encountered: