dtommy79
2 months ago
112
2
Laravel

Image upload

Posted 2 months ago by dtommy79

Hi,

I created a blog on localhost. I upload it to a live server. I placed the content of the "public" folder in the "public_html", and I uploaded the rest of the app outside the "public_html" in a separate folder.

When I create a category or a post where I can upload images, the images won't upload. I guess I need to change some path.

Originally I used this code on one of my controller:

$category = Image::make($image)->resize(1920,479)->stream();
            Storage::disk('public')->put('category/' . $imagename, $category);

Since I no longer have a "public" folder, I guess it needs to be changed, but not sure how. Also I'm not sure if I need to change anything in "config/filesystems.php"

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