Repository navigation
Thumbnails from server - #635
tobiasKaminsky wants to merge 5 commits into
Conversation
|
@davivel What do you think? |
There was a problem hiding this comment.
We should think in refactoring a bit this to add a "Thumbnail" resource in owncloud-library, but maybe we should merge this first.
On the while, some low level details:
Uri.encode(file.getRemotePath(), "/")does the same job thanURLEncoder.encode(file.getRemotePath(), "UTF-8").replaceAll("%2F", "/"), but shorter.- Instead of hardcoding 100 x 100, define constants like THUMB_WIDTH, THUMB_HEIGHT ; or even better, we can try to request the lowest resolution appropiate to get 32dp thumbnails, depending on the screen density.
There was a problem hiding this comment.
There is already a conversion dp-->px, so I am using this.
|
Reviewed. |
- Thumbnail size is set to 32dp
|
About the use of OwnCloudClient, it's fine. The refactoring we applied for the OwnCloudClient creation needs some improvements to be used out of the OperationService (all those possible exceptions when creating an OwnCloudAccount are really ugly), but I think it's fine for the moment. This is not a good moment for more refactoring on it. |
|
The needed changes of core (REST route) will be in master tomorrow. |
|
You are right, I forgot that point. Let me think a bit about it. |
Preview thumbnail from server for images that are not downloaded.
This uses newly created rest api for thumbnails (owncloud/core#11009).