Support the ongoing development of Laravel.io →
Security Requests Input
Last updated 10 months ago.
0

Hmmm... your code is spot on here... so it's gotta be that the directory isn't writable.

You could use this to check:

dd(is_writable($path . $fileName));

I come to this conclusion because of the error being 'NotWritableException' and because your code is solid.

Last updated 10 months ago.
0
Solution

When you look at the stack trace, you will find laravel checks for 777 permission before writing the file.

Last updated 10 months ago.
0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

ulshamim ulshamim Joined 17 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.