Local Scheme Handler

From Multi Theft Auto: Wiki
Revision as of 23:56, 19 June 2018 by Tails (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

In many cases it is necessary to access files stored on the local disk from browsers.

Scheme format

http://mta/resourceName/file.extension
  • resourceName: The resource name, local is a special name for the current resource
  • file.extension: The file path within resourceName

You can use this scheme format for loadBrowserURL as well as in HTML files e.g. <img> tags.


Minimum server version 1.5.0-9.07439
Minimum client version n/a

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.0-9.07439" />

Examples

Example 1

http://mta/myResource/assets/myImage.png

Refers to the file assets/myImage.png in a resource named myResource

Example 2

http://mta/local/assets/myImage.png

Refers to the file assets/myImage.png in the current resource