jeudi 18 octobre 2018

Laravel File Not Found At Path - Storage::move

I've run across an interesting predicament with the Laravel Storage::move function. In my controller I have the following lines of code:

$path = $files->storeAs('/public/temp/agentBilling', $name);
$file = Storage::url($path);

Now, with the script that follows right after this, it can recognize and locate $file using this combination: public_path() . $file;

Which looks like: E:/Apache/htdocs/CASAT/public/storage/temp/agentBilling/htz...jpeg

But, a little bit lower in my script here:

Storage::move(public_path() . $file, '/public/temp/agentBilling'.$pro.'.jpeg');

It says File not found at path:... even though that path (E:/Apache/htdocs/CASAT/public/storage/temp/agentBilling/htz...jpeg) is the same as above....

I've looked and there is a file at the path with the given name. I'm not sure what else to try. I'm just trying to rename the file at this point to see if it works.

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire