routes.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Bart Visscher <bartv@thisnet.nl>
  7. * @author Christoph Wurst <christoph@owncloud.com>
  8. * @author Lukas Reschke <lukas@statuscode.ch>
  9. * @author Robin Appelman <robin@icewind.nl>
  10. * @author Roeland Jago Douma <roeland@famdouma.nl>
  11. * @author Tobias Kaminsky <tobias@kaminsky.me>
  12. * @author Tom Needham <tom@owncloud.com>
  13. * @author Vincent Petry <pvince81@owncloud.com>
  14. *
  15. * @license AGPL-3.0
  16. *
  17. * This code is free software: you can redistribute it and/or modify
  18. * it under the terms of the GNU Affero General Public License, version 3,
  19. * as published by the Free Software Foundation.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU Affero General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU Affero General Public License, version 3,
  27. * along with this program. If not, see <http://www.gnu.org/licenses/>
  28. *
  29. */
  30. namespace OCA\Files\AppInfo;
  31. $application = new Application();
  32. $application->registerRoutes(
  33. $this,
  34. [
  35. 'routes' => [
  36. [
  37. 'name' => 'API#getThumbnail',
  38. 'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
  39. 'verb' => 'GET',
  40. 'requirements' => ['file' => '.+']
  41. ],
  42. [
  43. 'name' => 'API#updateFileTags',
  44. 'url' => '/api/v1/files/{path}',
  45. 'verb' => 'POST',
  46. 'requirements' => ['path' => '.+'],
  47. ],
  48. [
  49. 'name' => 'API#getRecentFiles',
  50. 'url' => '/api/v1/recent/',
  51. 'verb' => 'GET'
  52. ],
  53. [
  54. 'name' => 'API#updateFileSorting',
  55. 'url' => '/api/v1/sorting',
  56. 'verb' => 'POST'
  57. ],
  58. [
  59. 'name' => 'API#showHiddenFiles',
  60. 'url' => '/api/v1/showhidden',
  61. 'verb' => 'POST'
  62. ],
  63. [
  64. 'name' => 'view#index',
  65. 'url' => '/',
  66. 'verb' => 'GET',
  67. ],
  68. [
  69. 'name' => 'settings#setMaxUploadSize',
  70. 'url' => '/settings/maxUpload',
  71. 'verb' => 'POST',
  72. ],
  73. [
  74. 'name' => 'ajax#getStorageStats',
  75. 'url' => '/ajax/getstoragestats.php',
  76. 'verb' => 'GET',
  77. ],
  78. ]
  79. ]
  80. );
  81. /** @var $this \OC\Route\Router */
  82. $this->create('files_ajax_download', 'ajax/download.php')
  83. ->actionInclude('files/ajax/download.php');
  84. $this->create('files_ajax_list', 'ajax/list.php')
  85. ->actionInclude('files/ajax/list.php');