register
Registers a media by its path.
Return
the StoredMedia associated with the media. If a media was already bound to the path, it is returned. Otherwise, the new media is returned.
Parameters
path
path to the media, either a file or a URL
media
media to register
Registers a media by its path. The corresponding media is resolved lazily from the path.
Return
the StoredMedia associated with the path. If a media was already bound to the path, it is returned. Otherwise, the new media is returned. It may also return null if the media is not accepted into the storage.
Parameters
path
path to the media, either a file or a URL
workingDirectory
directory to resolve the media from, in case the path is relative