Extension:ApiSVGProxy
From MediaWiki.org
|
API SVG proxy Release status: experimental |
|
|---|---|
| Implementation | API |
| Description | Adds an API module that proxies SVG files from a (possibly remote) file repository to the local domain |
| Author(s) | Roan Kattouw (CatropeTalk) |
| MediaWiki | 1.15 |
| License | GPL |
| Download |
Download snapshot (Git master)
Git [?]: repo summary • tree • code changes SVN [?]: checkout-url • tree • code changes |
|
Check usage (experimental) |
|
[edit] What this extension does
This extension acts as a proxy between a remote file repository and local JavaScript. It allows you to access SVG files from a remote repository at a local URL, circumventing cross-domain restrictions.
[edit] Usage and restrictions
To access a remote SVG file locally, request api.php?action=svgproxy&file=File:Example.svg. Only files with the .svg extension and the image/svg+xml MIME type can be proxied.
[edit] Errors
When the SVG proxy fails, it will return an XML-formatted error result and an HTTP status code indicative of the error.
- code: nosuchfile
- info: The specified file does not exist
- HTTP status code: 404
- code: notsvg
- info: The specified file is not an SVG file
- HTTP status code: 403
- code: fetchfailed
- info: The specified file could not be fetched
- HTTP status code: 500
