-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
API getRemoteThumbnailByServer #1490
Comments
cc @rullzer - isn't this already implemented somehow? |
Uhm yes you can pass |
@rullzer Any chance to properly document this ? |
Arrggghhhhhh @MorrisJobke @rullzer but where is the documentation for this ? |
there is none. But to be fair there is no documentation at all on that endpoint. Will add it to the todo list. But I warn you that it is already pretty long... |
@rullzer for iOS Client how do i know what exists? API For certain procedures i am going crazy ... for example the getRemoteThumbnailByServer with scaled it's a plus for INCREDIBLE greatly speed of the downloads, i can view a preview and download the full image in the background (see dropbox) ... 😨 |
@marinofaggiana uhm well. Until somebody documents them we have no way besides browsing the source. Not saying that is good. But that is the way it currently is. |
@rullzer i test now the API but with -1 return error ... are you sure ? {"message":"Requested size must be numeric and a positive value."} |
What is the endpoint you use? |
@rullzer Just place a curl statement in here to bring this ping pong game to an end ;) |
/index.php/apps/files/api/v1/thumbnail/ |
@rullzer ? |
Ah sorry this fell of my radar. Right the files endpoint is not accepting that. |
@rullzer ok, thanks, but it's very important the doc of API (all API), i want speak of these with @karlitschek , the mobile app are the first interface and i think thats any deployment of servers should have the same on the client .. now the client (ios / android. .. windows mobile) do not have search, favorite sync, trash and moore ... and i don't know if the new version 11 have thought to this one problem ... What do you think about this suggestions? |
Yes I agree. But as stated if there are no docs it is not officially supported right now. |
toc toc, I need here ... @rullzer , @tobiasKaminsky are you agree? |
On Android I am just passing the desired with/height to this endpoint. |
@tobiasKaminsky I don't know the form (with/height) of image and if I download the thumbnail the image is distort (no proportionate) the getRemoteThumbnailByServer required the H and W ... No ? |
Why don't you know the form? You have on iOS some sort of canvas / image form, where you want to put the image into. So you can use this? |
I don't know the form (h w) of original image, you yes ? how ? |
Why do you need to know the form (h/w) of original image? |
for download the correct Thumbnail ... example Original Image : 3000 X 800 Thumbnail : 640 x ... ? (170) but I dont know the original form (h/w) and I download as ? getRemoteThumbnailByServer (H 640 W ... ?) |
@rullzer write :
but this do not works |
hm. we do it this way: So we do not need to know any value of the original image, but only from the desired image. |
There is some logic for finding the right ratio when u pass -1 for height, width or both. But api endpoint does not accept these . |
"/index.php/core/preview.png?file="remotePath + "&x=" + pxW + "&y=" + pxH + "&a=1&mode=cover&forceIcon=0"; ??? pxW & pxH whats put see example ? you don't use API getRemoteThumbnailByServer ? Thumbnail (is always square) mmm no, I want a image with 640 w and H in proportion p.s. @danielkesselberg yes correct @rullzer ping. |
I need to write proper docs (yes it is on the todo). Anyway. You can have the endpoint scale automatically. It will get the closest larger image it can find. So if you have 640x480 screen. And you request that but you say we should honor aspect ration. Then it will return for example an image of 700x512 if that is what we have. |
example:
That should give you workable previews. |
@rullzer thanks! ok I try but API getRemoteThumbnailByServer with a square (example 120x120) scale automatically or not .... not I think and the image is distort |
@marinofaggiana if you want a square image do:
so with |
yes thx |
@rullzer : Toby write : https://cloud.xxxxxx.it/index.php/core/preview.png?file=1/1.jpg&x=640&y=480&a=1&mode=cover and this works. You write : this not works. Are you sure : |
Your fileid is not correct. The fileid is just a number. However you can also use the endpoint with the path is that is easier for you. |
your file id is the "remote id", wich is "fileId" (8 digit) + "serverId" |
https://cloud.xxxx.it/index.php/core/preview?fileID=283798&x=640&y=480&a=1&mode=cover No ... I use the endpoint with path... |
Yes because that is the wrong url: It should then be: |
no. :-))) ok guys ... bye |
Ah you changed the parameter: https://cloud.xxxx.it/index.php/core/preview?fileId=283798&x=640&y=480&a=1&mode=cover ANyway else just use the one with the path. |
Okay ... as this is a documentation issue we should close it. |
Request modify API getRemoteThumbnailByServer -> iOS
Now the function required : Width and Height but i need a proportionate imagines (scaled) i don't know the original dimension of image...
Possibility : if Width or Height it's 0 return then image scaled and proportionate
Example : Width = 640 Height = 0 return the image proporzionate with Width = 640
other ideas ??
@schiessle
The text was updated successfully, but these errors were encountered: