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
Files with non-standard extension casing don't get picked up for automatic conversion #17
Comments
AirMessage Server should automatically convert .heic files to .jpeg for the web and Android clients, whenever they request to download an attachment. I can confirm this by downloading this HEIC test file, sending it in a conversation, and then downloading that file from AirMessage for web. It gets converted to a .jpeg, and the web browser can display it. Are you finding that this is not the case? |
I used browser inspector, it shows it tried to access the image link like this: https://web.airmessage.org/28c372fc-7f19-41d7-8ea4-1cc209881efb, so how does it tell it is heic? the interesting thing is it shows http 200 back. |
can you point me in the code where it does the conversion? Maybe I can fix the bug myself. |
Thank you for the details. FileNormalizationHelper.swift is what controls converting files from Apple's proprietary formats to more common ones. Another place I would recommend to check is the server logs, which you can find at
|
checked the logs, it doesn't have any details. only got this: |
I read the code, I think the problem is at this line 80 : |
if my test server uses connect-open.airmessage.org, what's the link for web client? |
I see, that makes sense. Your file isn't being picked up because the file extension is in capitals. For now, the server should be updated to recognize file extensions in a case-insensitive manner. I've made these changes in this commit. I agree that at some point this should be done in a more robust manner, perhaps by inspecting the file, or using the mime_type field that Messages provides. I'm transferring this issue to airmessage-server. Thank you so much for your help! |
I do not have any pre-built site set up for connect-open.airmessage.org, though now that you bring it up it sounds like it might be a good idea. For now, you will have to build it from source. |
i can build it from source, the config file is pointing to the connect-open.airmessage.org, how do I change it to point to the real server? The key file is also for the test server I believe. |
The client secrets for the primary server are not publicly available. I ask that developers please do not connect unofficial clients to AirMessage's primary server. My apologies for the inconvenience. |
can you help release a beta for the fix? |
another thing is, why is it designed to click the image to show? why not just show the images automatically? |
I'll be able to prepare a release with this fix this week. Having attachments automatically show up is something I'd love to have. There's no strict reason as to why it's not implemented, though compression or automatic conversions make this a little trickier. |
|
The issue with this approach is that it can take up a lot of bandwidth and data if users aren't prepared for it. AirMessage for Android has this functionality, though it's a fairly simple implementation that downloads small files as you scroll by them. |
I think you worry about it too much. The folks who want to use this App are geeks. Their gadgets and network speed shall be more than enough to handle this tiny traffic. |
currently if the user sends an heic image, the web still shows the download sign, but it doesn't either display or download the image,
currently, no browser can actually support heic image yet, so we need a mechanism to automatically convert the heic to JPG
The text was updated successfully, but these errors were encountered: