[Koha-bugs] [Bug 22835] Serve static files from plugins through the API
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue May 28 13:20:31 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22835
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #89663|0 |1
is obsolete| |
Attachment #89664|0 |1
is obsolete| |
Attachment #89812|0 |1
is obsolete| |
--- Comment #16 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 90148
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90148&action=edit
Bug 22835: Serve plugin static files through API
This patch serves static files declared within plugins.
To declare static files the plugin must implement the method 'static_routes'
which retrieves the spec of static file routes to add to the API.
Once those routes are added to the API, the become available through the
/api/v1/contrib/<api_namespace>/static/<path>/<to>/<file>/<filename> endpoint.
To test:
1) Install bug-22835-plugin.kpz
2) Point your browser to /api/v1/contrib/kitchensink/static/static_files/mm.gif
CHECK => No file is served
3) Apply this patch
4) restart_all
5) Repeat step 2.
SUCCESS => File is served!
6) Sign off
Sponsored-by: Theke
Signed-off-by: Arthur Suzuki <arthur.suzuki at biblibre.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list