$modx->loadClass('sources.modMediaSource');
$source = modMediaSource::getDefaultSource($modx);
$basePath = $properties['basePath']['value'];This question has been answered by exside. See the first response.
$modx->loadClass('sources.modMediaSource');
$source = modMediaSource::getDefaultSource($modx);
$source->initialize();
$basePath = $source->getBasePath();$mediasource = $modx->getObject('modMediaSource', array('id' => 1)); // <---- media source ID is hard coded
$properties = $mediasource->get('properties');
$basePath = $properties['basePath']['value'];
Is there a list of properties that are available? If there is I can't find it.Don't know how I missed it: http://fossies.org/dox/modx-2.3.1-pl/classmodMediaSource.html
when I manually prepend the modx base path + media source path it works and ... On the first request with empty cache $source->getBasePath() returns the fullhttp://bugs.modx.com/issues/7392
$source->get('id');$source->getBasePath;
$properties = $source->getProperties(); $basePath = isset($properties['basePath']['value'])?$properties['basePath']['value']:'';
modFileMediaSource did allways return the absolute - path with $source->getBasePath; when basePathRelative was set to true, is it set to true in your mediasource - setting?Yes, basePathRelative is true in the mediasource settings, so not a bug just lack of understanding on my part.
$source->get('id');
$defaultsource = $modx->getOption('default_media_source');