Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 287 Rev 290
Línea 536... Línea 536...
536
 
536
 
537
    /**
537
    /**
538
     *
538
     *
539
     * @param string $path
539
     * @param string $path
540
     * @param string $code
540
     * @param string $code
541
     * @param string $filename
541
     * @param string $local_filename
542
     * @return boolean
542
     * @return boolean
543
     */
543
     */
544
    public function putFile($path, $code, $filename)
544
    public function putFile($path, $code, $local_filename)
545
    {
545
    {
546
        if($code) {
546
        if($code) {
547
            $filepath = $path . '/' . $code;
547
            $remote = $path . '/' . $code . '/' . basename($local_filename);
548
        } else {
548
        } else {
549
            $filepath = $path;
549
            $remote = $path. '/' . basename($local_filename);
Línea -... Línea 550...
-
 
550
        }
550
        }
551
        
-
 
552
 
551
        
553
        $result = $this->s3Files->putObject($remote, $local_filename);
-
 
554
        if(file_exists($local_filename)) {
Línea 552... Línea 555...
552
        $result = $this->s3Files->putObject($filename, $filepath);
555
            @unlink($local_filename);
553
        @unlink($filename);
556
        }