You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a fresh install of 3.6.0.
In file app/Models/Album.php:
public function copyCoverFile($srcPath)
{
$extension = pathinfo($srcPath, PATHINFO_EXTENSION);
$destPath = $this->generateRandomCoverPath($extension);
copy($srcPath, $destPath);
$this->update(['cover' => basename($destPath)]);
}
private function generateRandomCoverPath($extension)
{
return app()->publicPath().'/public/img/covers/'.uniqid('', true).".$extension";
}
The line copy($srcPath, $destPath); is causing the following error: [ErrorException] copy(/var/www/public/img/covers/58eeea295471a5.02522229.jpg): failed to open stream: No such file or directory
Because while app()->publicPath().'/public/img/' existed on the new install. The /covers subdirectory didn't. Creating the directory allowed me to run the import.
The text was updated successfully, but these errors were encountered:
Hi,
I had a fresh install of 3.6.0.
In file app/Models/Album.php:
The line
copy($srcPath, $destPath);
is causing the following error:[ErrorException] copy(/var/www/public/img/covers/58eeea295471a5.02522229.jpg): failed to open stream: No such file or directory
Because while
app()->publicPath().'/public/img/'
existed on the new install. The/covers
subdirectory didn't. Creating the directory allowed me to run the import.The text was updated successfully, but these errors were encountered: