[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
Fri May 3 02:12:45 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22835

--- Comment #1 from Agustín Moyano <agustinmoyano at theke.io> ---
Created attachment 89262
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89262&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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list