File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public function getPreview(
8181 bool $ a = false ,
8282 bool $ forceIcon = true ,
8383 string $ mode = 'fill ' ,
84- bool $ mimeFallback ): Http \Response {
84+ bool $ mimeFallback = false ): Http \Response {
8585 if ($ file === '' || $ x === 0 || $ y === 0 ) {
8686 return new DataResponse ([], Http::STATUS_BAD_REQUEST );
8787 }
Original file line number Diff line number Diff line change 10751075 "name" : " mimeFallback" ,
10761076 "in" : " query" ,
10771077 "description" : " Whether to fallback to the mime icon if no preview is available" ,
1078- "required" : true ,
10791078 "schema" : {
1080- "type" : " integer"
1079+ "type" : " integer" ,
1080+ "default" : 0
10811081 }
10821082 }
10831083 ],
Original file line number Diff line number Diff line change 2626use OC \Core \Controller \PreviewController ;
2727use OCP \AppFramework \Http ;
2828use OCP \AppFramework \Http \DataResponse ;
29- use OCP \AppFramework \Utility \ITimeFactory ;
3029use OCP \Files \File ;
3130use OCP \Files \Folder ;
3231use OCP \Files \IRootFolder ;
3534use OCP \Files \Storage \IStorage ;
3635use OCP \IPreview ;
3736use OCP \IRequest ;
37+ use OCP \Preview \IMimeIconProvider ;
3838
3939class PreviewControllerTest extends \Test \TestCase {
4040 /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
@@ -62,7 +62,7 @@ protected function setUp(): void {
6262 $ this ->previewManager ,
6363 $ this ->rootFolder ,
6464 $ this ->userId ,
65- $ this ->createMock (ITimeFactory ::class)
65+ $ this ->createMock (IMimeIconProvider ::class)
6666 );
6767 }
6868
You can’t perform that action at this time.
0 commit comments