Exemple #1
0
 /**
  * Get the virtual URL for the file itself
  *
  * @param $suffix bool|string if not false, the name of a thumbnail file
  *
  * @return string
  */
 function getVirtualUrl($suffix = false)
 {
     $path = $this->repo->getVirtualUrl() . '/public/' . $this->getUrlRel();
     if ($suffix !== false) {
         $path .= '/' . rawurlencode($suffix);
     }
     return $path;
 }
Exemple #2
0
 /**
  * Returns the virtual chunk location:
  * @param int $index
  * @return string
  */
 function getVirtualChunkLocation($index)
 {
     return $this->repo->getVirtualUrl('temp') . '/' . $this->repo->getHashPath($this->getChunkFileKey($index)) . $this->getChunkFileKey($index);
 }
Exemple #3
0
 /**
  * Get the virtual URL for a thumbnail file or directory
  *
  * @param bool|string $suffix If not false, the name of a thumbnail file
  * @return string
  */
 function getThumbVirtualUrl($suffix = false)
 {
     $this->assertRepoDefined();
     $path = $this->repo->getVirtualUrl() . '/thumb/' . $this->getUrlRel();
     if ($suffix !== false) {
         $path .= '/' . rawurlencode($suffix);
     }
     return $path;
 }