Skip to content

Files thumbnail fix - #14919

Merged
MorrisJobke merged 1 commit into
owncloud:masterfrom
rullzer:files_thumbnail_fix
Mar 24, 2015
Merged

MorrisJobke merged 1 commit into
owncloud:masterfrom
rullzer:files_thumbnail_fix

Conversation

@rullzer

@rullzer rullzer commented Mar 16, 2015

Copy link
Copy Markdown
Contributor

Using OC_Image->show() already sends headers. So don't use that if more headers are required.

Related issues #12712 and #14378

  • The DataDisplayResponse is now used.
  • IPreview is injected
  • Some unit tests

@rullzer rullzer added this to the 8.1-current milestone Mar 16, 2015
@karlitschek

Copy link
Copy Markdown
Contributor

@georgehrke What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use DataResponse instead of the JSONResponse?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be more generic. So return JSON by default... but if the users prefers xml (or in the future some other format) return that.

@enoch85

enoch85 commented Mar 22, 2015

Copy link
Copy Markdown

Sorry to say, but this doesen't fix the issue. Just implemented the patch and got this instead:

Error   PHP Class 'OCP\AppFramework\Http\DataDisplayResponse' not found at /var/www/owncloud/apps/files/controller/apicontroller.php#66 2015-03-22T18:31:51+00:00
Error   PHP Argument 1 passed to OCA\Files\Appinfo\Application::OCA\Files\Appinfo\{closure}() must be an instance of OCA\Files\Appinfo\IContanier, instance of OC\AppFramework\DependencyInjection\DIContainer given, called in /var/www/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php on line 112 and defined at /var/www/owncloud/apps/files/appinfo/application.php#40    2015-03-22T18:31:51+00:00

Ubuntu 14.04 with ownCloud in /var/www

@georgehrke

Copy link
Copy Markdown
Contributor

@enoch85 I guess this patch only works for master and you are on stable8(?!)

@enoch85

enoch85 commented Mar 22, 2015

Copy link
Copy Markdown

@georgehrke Yes, that's correct. 8.0.2 to be specific. So this will be released with 8.1 or 8.0.3?

@rullzer

rullzer commented Mar 22, 2015

Copy link
Copy Markdown
Contributor Author

@georgehrke @enoch85 Yes this patch only works on master.

@enoch85

enoch85 commented Mar 22, 2015

Copy link
Copy Markdown

@rullzer Can I add something to get this to work with 8.0.2? Would save my day!

@rullzer

rullzer commented Mar 22, 2015

Copy link
Copy Markdown
Contributor Author

@enoch85 you could try to just add https://github.com/owncloud/core/blob/master/lib/public/appframework/http/datadisplayresponse.php however no guarantees.

Also, this means that this PR will (probably) not be backported to 8.0.3

@enoch85

enoch85 commented Mar 22, 2015

Copy link
Copy Markdown

Got this:

Argument 1 passed to OCA\Files\Appinfo\Application::OCA\Files\Appinfo\{closure}() must be an instance of OCA\Files\Appinfo\IContanier, instance of OC\AppFramework\DependencyInjection\DIContainer given, called in /var/www/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php on line 112 and defined at /var/www/owncloud/apps/files/appinfo/application.php#40

Thanks for fixing this anyway!

@rullzer

rullzer commented Mar 22, 2015

Copy link
Copy Markdown
Contributor Author

@enoch85 I do not know about that error. I think it is best to wait for 8.1 since else this would lead to a lot of backporting.

Probably best to keep this issue to reviewing the proposed fix. So we can get it in 8.1.

@enoch85

enoch85 commented Mar 22, 2015

Copy link
Copy Markdown

The fix works as long as I don't use the Android App. Before, my log was flooded even without using the app. FYI @rullzer

Comment thread apps/files/appinfo/application.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use $server->getPreviewManager() here and add use ($server) to this method, then you don't need

@nickvergessen

Copy link
Copy Markdown
Contributor

👍 apart from the little comment

@rullzer

rullzer commented Mar 24, 2015

Copy link
Copy Markdown
Contributor Author

@nickvergessen thanks.

If Jenkins is happy I'll rebase and squash the commits.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Works and no errors in the log 👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

Same failing tests as on master. nickvergessen is working on this -> merge

@MorrisJobke

Copy link
Copy Markdown
Contributor

Wait. I don't will merge this. We should wait on the fix to have the tests run on all databases

@LukasReschke

Copy link
Copy Markdown
Contributor

🙈

@rullzer

rullzer commented Mar 24, 2015

Copy link
Copy Markdown
Contributor Author

@MorrisJobke yeah waiting is probably best :P

* Only use public interfaces
  - Injected IPreview
* Added unit tests
@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 4 new issues, 3 updated code elements

@ghost

ghost commented Mar 24, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/10803/
Test PASSed.

MorrisJobke added a commit that referenced this pull request Mar 24, 2015
@MorrisJobke
MorrisJobke merged commit 0a84e26 into owncloud:master Mar 24, 2015
@rullzer
rullzer deleted the files_thumbnail_fix branch March 25, 2015 20:27
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants