1
0

routes.php 2.4 KB

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