Comments (10)
but I don't know since whatsapp shared images are already jpeg and even those ones get broken after some time
In older app versions, even if an image was already a JPEG, it would still have been re-encoded - so the new version might fix it.
from quill.
I've ended up using a hybrid approach that first tries to get the image path and upload it directly, and failing that falls back to the old JPEG conversion approach. This should be more robust than both methods while preserving data integrity as far as possible. See the commit message for more details.
from quill.
This deserves another look after further helpful advice from StackOverflow. It should be possible to simply get an InputStream
from the picked Uri
and write it to a File
without decoding it into a Bitmap
first, that way we preserve the original encoding exactly and don't have to mess around with Uri => path conversion in a hacky way.
NOTE: Retrofit 1.x supports uploading directly from an InputStream
, Retrofit 2.x also does.
Also fix #119 to avoid SecurityException
on Android 6.0+.
from quill.
Images inserted into articles from the Quill app end up displaying the broken image icon (see below) after some time (undefined amount of time ranging from 2 days to 2 weeks on avg) for no apparent reason.
Images uploaded from the ghost web admin interface from a desktop PC do not suffer this.
I saw on the 1.5.4 release you addressed some image upload problems. Is that fix related to the problem I described above and this issue?
By the way many thanks Vicky, your project is awesome and deserves eternal respect (plus official Ghost Foundation baking in my opinion).
from quill.
@RcrdBrt if the URL for the image is still correct after the broken image shows up, and if the same image is still correctly displayed on the Ghost web interface, then the likely culprit is your internet connection. Could you try going to App Settings, clear the cache, and open the post again with a stable connection? At least that would confirm the problem.
from quill.
The url is fine when the image breaks, it was the first thing that came to my mind to troubleshoot this. Those images are displayed correctly for like 2 weeks and then suddenly the Ghost blog fails to "render" them both on mobile and desktop. I downloaded the actual files uploaded from the app via rsync
and I can open and watch them just fine (also their thumbnails if it can help) from a random image viewer or even Google Chrome.
from quill.
I see. Can you try the cache clearing workaround I described above?
from quill.
Sure, I'll let you know if it still happens.
Thanks!
from quill.
Oh you know what, I just read your previous comment carefully and noticed you said it fails to render even on desktop. That's... interesting, and strange.
I think the new update (v1.5.5) might fix the issue, because before this I used to convert (i.e., decode and re-encode) the image to a JPEG (even if it was already a JPEG), but now I upload the image exactly in its original format. Let me know if you still see it after updating to 1.5.5 and uploading some new images.
from quill.
Yeah, it fails on desktop too. I thought that maybe there was some shared cache system I wasn't aware of and I was trying to do your suggestion anyway.
I read about the JPEG not-necessary compression your app does. I hope that is the issue, but I don't know since whatsapp shared images are already jpeg and even those ones get broken after some time if I upload them with Quill.
from quill.
Related Issues (20)
- Add Android 7.1 support
- Word count in post editor
- Drafts are not deleted if they're edited right before deletion
- Create new posts by sharing text/photos to the app HOT 3
- Multiple Image Upload HOT 2
- Nginx HTTP/2 server: REFUSED_STREAM error HOT 2
- Migrate to Retrofit 2
- Unable to login (likely cause: timeout exceeded) HOT 9
- Editor loses cursor position after resuming
- Unable to login if Ghost admin is at /blog/ghost HOT 4
- Ghost 1.0 HOT 2
- Allow editing SEO fields (meta-description, ...)
- F-Droid HOT 2
- Add a "Turn this post into a page" checkbox in the post sidebar HOT 3
- Add a field for custom excerpts in the post editor sidebar
- Handshake failed. Your blog does not support https, Try to changing it to http HOT 5
- Cannot login to my blog HOT 1
- Access denied to Ghost 1.6.2 HOT 1
- Retire Quill, move data over to TryGhost/Ghost-Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quill.