image storage things -laravel

Posted 8 months ago by nonanovi

i have an image that already coverted to base64. what to do in this line of code so that i can store that image to ex : image_generated_name.jpg.

if ($request->hasFile('image')) {
            $info->image = Storage::url(
                $request->file('image')->store('info', [
                    'disk' => 'public'
                ])
            );
        }

i did like decoding the decode the encoded image using : file(base64_decode('image') but it dont work

why, what wrong, and how ?

Please sign in or create an account to participate in this conversation.