Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 755 Rev 760
Línea 526... Línea 526...
526
            }
526
            }
Línea 527... Línea 527...
527
 
527
 
528
 
528
 
-
 
529
            return $this->getPresignedUrl($remoto);
-
 
530
        }
-
 
531
 
-
 
532
        $remoto = $path . DIRECTORY_SEPARATOR . $filename;
-
 
533
 
529
            return $this->getPresignedUrl($remoto);
534
        if (file_exists($remoto)) {
-
 
535
            return $this->getPresignedUrl($remoto);
-
 
536
        }
-
 
537
 
530
        }
538
        $remoto = $this->getFullPathImageDefault();
Línea 531... Línea 539...
531
        return;
539
        return $this->getPresignedUrl($remoto);
532
    }
540
    }
533
 
541
 
Línea 899... Línea 907...
899
     * @param string $url
907
     * @param string $url
900
     * @return string
908
     * @return string
901
     */
909
     */
902
    public function getPresignedUrl($url)
910
    public function getPresignedUrl($url)
903
    {
911
    {
-
 
912
        return $url;
904
        $code = hash('sha256', $url);
913
        $code = hash('sha256', $url);
Línea 905... Línea 914...
905
 
914
 
906
        $storageFileMapper = \LeadersLinked\Mapper\StorageFileMapper::getInstance($this->adapter);
915
        $storageFileMapper = \LeadersLinked\Mapper\StorageFileMapper::getInstance($this->adapter);
907
        $storageFile = $storageFileMapper->fetchOneByCode($code);
916
        $storageFile = $storageFileMapper->fetchOneByCode($code);