Intervention Image
Hello again, I'm using intervention to handle some image upload and stuffs like that, but it's giving me a error "notWritable" when I try to
->save(public_path(), '/upload/');
Says it's not writable, I searched the interwebs and found that it checks for chmod 777 but I'm on Windows OS, what can I do?
Also, when I run the cmd isWritable gives me boolean false .
I don know what to do :/
Thanks !
Try using
->save(public_path(). '/upload/');
I just made a typo here, my code is correct ;)
1:
$file = Input::file('photo');
$filename = md5(time());
$img = Image::make($file->getRealPath())->save('..\public\upload\\', $filename);
2:
$file = Input::file('photo');
$filename = md5(time());
$img = Image::make($file->getRealPath())->save(public_path().'/upload/', $filename);
Both don't work :/ error (Can't write image data to path )
I changed my code to absolute path and still the problem persists, I think it has something to do with permissions, maybe I'm wrong... don't know ;/
$img = Image::make($file->getRealPath())->save("public/upload/", $filename);
Make sure you created the upload folder inside public folder.
On win7 you must give "Full Access" to all users on your machine even if you are the admin... winbugs :/. Thanks again guys!
Please or to participate in this conversation.