Level 50
If you use Herd you need to secure your site in Herd/Settings/Sites looks for a "Lock" icon
Hello i've a problem i develop with laravel / Inertia / herd ....
I have always this error when i upload image files ...
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed
This error is pretty explicit (SSL problem) but i dont know what i need to do that in laravel in dev/prod env .... I already generate new key:generate and herd:secure ...
I have my trait for image uploads.
<?php
namespace App\Http\Traits;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Imagick\Driver;
trait Resizer
{
public function resize(string $url, string $directory, int $width, int $height, int $quality = 100): bool
{
Storage::makeDirectory($directory);
$extension = File::extension($url);
$filename = uniqid() . '.' . $extension;
$saveFormat = match ($extension) {
'jpg', 'jpeg' => 'toJpgeg',
'png' => 'toPng',
'webp' => 'toWebp',
};
$manager = new ImageManager(new Driver());
$thumbnailImage = $manager
->read(file_get_contents($url))
->scale($width, $height)
->$saveFormat($quality);
dd($thumbnailImage);
Storage::put($directory . '/' . $filename, $thumbnailImage);
$thumbnailPath = $directory . '/' . $filename;
$thumbnailUrl = Storage::disk('public')->url($thumbnailPath);
$this->update([
'thumbnail_path' => $thumbnailPath,
'thumbnail_url' => $thumbnailUrl,
]);
return true;
}
}
If anyone have already this problem ? thanks you
Please or to participate in this conversation.