mardi 5 juin 2018

How to obtain the route path of a file that was accessed by FTP?

I'm trying to get the route where I have several stored files which I get through an FTP connection from the Laravel 5.1 Filesystem, this is then copied to my server

$origen = Storage::disk('ftp')->get($file)->getRealPath();
$destino = 'ruta de mi servidor';

Storage::copy($origen, $destino);

But the origin line always leaves error Call to a member function getRealPath() on string. I have also tried Storage::disk('ftp')->getDriver()->getAdapter()->getPathPrefix();, but in this I can not answer, nothing returns, or Storage::disk('ftp')->url($file) and I also get an error that it is not a function.

Any solution to obtain this route?. Sorry for the bad English



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire