# Class: Resource

## Resource()

The base class of document resources, for example, the images referenced by the document.

## Constructor

#### new Resource()

Invoked by ResourceStorage to create a resource object.

Source:
  - res/Resource.js, line 9

### Classes

Resource

### Members

#### data

Returns the ready-to-use, fully loaded, content of this resource object, a `Blob` or a `File`.

IMPORTANT: may return `null` in case the ResourceStorage has no way to actually load this resource. without prompting the user to do so. This is for example the case of local files.

Source:
  - res/Resource.js, line 29

#### uri

Returns the absolute URI of this resource object.

Source:
  - res/Resource.js, line 17

### Methods

#### toJSON()

Returns a JSON representation of this resource object which is only useful when testing and debugging.

Source:
  - res/Resource.js, line 47

#### toString()

Returns a string representation of this resource object which is only useful when testing and debugging.

Source:
  - res/Resource.js, line 37