}
$base = 'fluidbookpublication/docs/' . $this->id . '/' . $path;
- $res = Files::mkdir($this->region == 'UE' ? protected_path($base) : us_protected_path($base));
+ $res = Files::mkdir($this->getRegion() == 'UE' ? protected_path($base) : us_protected_path($base));
if ($fname) {
$res .= $fname;
return $res;
}
+ public function getRegion()
+ {
+ return $this->region ?? 'UE';
+ }
+
public function hasFile($page, $format = 'jpg', $resolution = 150, $quality = 85, $withText = true, $withGraphics = true, $version = 'html', $forceCheck = false)
{
$this->_normalize($format, $resolution, $quality, $withText, $withGraphics, $version);
public function _getFile($page, $format = 'jpg', $resolution = 150, $quality = 85, $withText = true, $withGraphics = true, $version = 'html', $forceCheck = true)
{
- Farm::setRegion($this->region);
+ Farm::setRegion($this->getRegion());
if (!$this->hasFile($page, $format, $resolution, $quality, $withText, $withGraphics, $version, $forceCheck)) {
return Farm::getFile($page, $format, $resolution, $quality, $withText, $withGraphics, $version, $this->getResolutionRatio(), $this->getMobileFirstRatio(), $this->path());
}