Repository navigation
REST API for thumbnails - #11009
REST API for thumbnails#11009
Conversation
976f39f to
e6c30b6
Compare
|
Also @PVince81 and @DeepDiver1975. Can be tested with a request like |
|
Might also be interesting for the mobile client team |
|
Indeed very cool. 👍 Thanks |
|
@rperezb For the team... |
|
got it, thx! |
|
@owncloud-bot Retest this please. |
|
🚀 Test Passed. 🚀 |
There was a problem hiding this comment.
Should this rather be 404 not found ?
There was a problem hiding this comment.
Not sure. This is OCS and not really REST. - I'd prefer to keep it this way.
@karlitschek What do you think? - You've written that specification, not me ;-)
There was a problem hiding this comment.
For new stuff we should do real REST. So 404 is good. The old stuff has to stay backward compatible unfortunately
There was a problem hiding this comment.
That sounds good :-)
e6c30b6 to
04afc2a
Compare
|
@PVince81 @karlitschek Migrated to REST now, accessible via CURL command: |
04afc2a to
15edd3d
Compare
|
@tobiasKaminsky If you want to review this too: Go for it ;-) - I changed the route to use somewhat more REST instead of our OCS routes. |
|
tested - works 👍 |
|
works 👍, code looks good |
15edd3d to
6880363
Compare
Thumbnail generation Removed Log Added requested changes Added requested changes. - Fix code style - Add exception if file does not exist - Switch route styling Replaces #10805 Fix codestyle Fix codestyle Migrate to appframework Fix typo
6880363 to
e62d5b7
Compare
|
squashed and rebased |
|
A new inspection was created. |
|
💣 Test Failed. 💣 |
|
|
@owncloud-bot Retest this please |
|
🚀 Test Passed. 🚀 |
|
http://localhost/owncloud/index.php/apps/files/api/v1/thumbnail/100/100/3.jpg is working while What am I doing wrong? |
|
Nothing... Unexpected behaviour of routing. On it.... |
|
Another "problem": |
|
This seems to be more a problem in the Android code and not a server-side one. Please give an example what the result of |
|
I am only encoding the remote path of the file: For more see here: http://www.w3schools.com/tags/ref_urlencode.asp --> URL Encoding Functions In the previous version without the REST Api it had worked without a problem as normal PHP understands this encoded url also as a local path. |
|
I'd really say here you should not urlencode the path here... - Decoding the values server-side seems like a major hack... |
|
The problem is that GetMethod requires it... Is it not possible to just pass the urlencoded path as $file to $preview = new \OC\Preview('', 'files', $file, $x, $y, true)? At least this is working: But unfortunately the encoded path is not given to the function... |
|
Ok - I'll think of this tomorrow. |
|
Great! |
|
@LukasReschke I need a little bit of testing, but I guess I have solved it:
This is working for all special characters and whitespaces in files and/or folders. |
|
@LukasReschke Do you think you can change the $preview line as suggested above? |
|
@LukasReschke As things are getting serious in owncloud/android#635 it would be great if you can change the $preview line as suggested? |
|
@tobiasKaminsky Sorry - got caught up with other things and forgot about this. There we go now: #11675 |
|
No problem. |
This replaces #10805, changes:
@georgehrke