henryoladj's avatar

Image Upload on Vultr Nginx (504 Gateway Time-out)

In my controller i have this code

private function storeImage($post)
    {
        if (request()->hasFile('image')){

            $original = request()->file('image')->getClientOriginalName();

            $post->update([
                'image' => request()->file('image')->storeAs('uploads', $original),
            ]);

            $image = Image::make('image/'. $post->image);
            $image->save();
        }
    }

which stores image on localhost but does not store image on my Vultr Ubuntu 19.10 x64 it loads after a while when i click create then gives this error 504 Gateway Time-out

the above code creates an image folder and also uploads folder on localhost but is not working on Vultr

0 likes
3 replies

Please or to participate in this conversation.