Proyectos de Subversion LeadersLinked - Services

Rev

Rev 763 | Rev 781 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 763 Rev 767
Línea 515... Línea 515...
515
     */
515
     */
516
    public function getGenericFile($path, $code, $filename)
516
    public function getGenericFile($path, $code, $filename)
517
    {
517
    {
518
        $remoto = $path . DIRECTORY_SEPARATOR . $code . DIRECTORY_SEPARATOR . $filename;
518
        $remoto = $path . DIRECTORY_SEPARATOR . $code . DIRECTORY_SEPARATOR . $filename;
Línea 519... Línea -...
519
 
-
 
520
 
-
 
521
 
519
 
522
        if (file_exists($remoto)) {
520
        if (file_exists($remoto)) {
Línea 523... Línea 521...
523
            if ($code == 'd8e6c5de-52a6-4c28-bdce-4ba2823ba841') {
521
            if ($code == 'd8e6c5de-52a6-4c28-bdce-4ba2823ba841') {
524
 
522
 
Línea 907... Línea 905...
907
     * @param string $url
905
     * @param string $url
908
     * @return string
906
     * @return string
909
     */
907
     */
910
    public function getPresignedUrl($url)
908
    public function getPresignedUrl($url)
911
    {
909
    {
912
        $storage_url = 'https://' . $_SERVER['SERVER_NAME'] . '/' . $url;
-
 
913
        return $storage_url;
-
 
914
 
-
 
915
        /*
-
 
916
        $code = hash('sha256', $url);
910
        $code = hash('sha256', $url);
Línea 917... Línea 911...
917
 
911
 
918
        $storageFileMapper = \LeadersLinked\Mapper\StorageFileMapper::getInstance($this->adapter);
912
        $storageFileMapper = \LeadersLinked\Mapper\StorageFileMapper::getInstance($this->adapter);
919
        $storageFile = $storageFileMapper->fetchOneByCode($code);
913
        $storageFile = $storageFileMapper->fetchOneByCode($code);
Línea 930... Línea 924...
930
 
924
 
Línea 931... Línea 925...
931
 
925
 
932
        $url = 'https://' . $_SERVER['SERVER_NAME'] . '/storage/' . $code;
-
 
933
 
926
        $url = 'https://' . $_SERVER['SERVER_NAME'] . '/storage/' . $code;
Línea 934... Línea 927...
934
        return $url;
927
 
935
        */
928
        return $url;
936
    }
929
    }