Local Scheme Handler

From Multi Theft Auto: Wiki
Revision as of 10:01, 18 August 2015 by Jusonex (talk | contribs) (Created page with "__NOTOC__ In many cases it is necessary to access files stored on the local disk from browsers. {{New feature/item|3.0151|1.5.1|7439| ==Scheme format== <syntaxhighlight lang="lua">http://mta/resou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.


This template will be deleted.

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/myImage.png

Refers to the file myImage.png in the current resource