Closed fouedmoussi closed 5 years ago
This looks like a permission problem based on you os. Which is the server is running on?
EDIT3: Have trouble too and investigate.
EDIT2: Go to gymie\storage\medialibrary --> rightclick --> security --> add "everyone" with full access rights
Editd: sorry windows I see. check if the storage folder has full wirte access.
@cracker182 Yes i'm on Windows 10 and i use XAMPP Version: 7.1.14 Includes: Apache 2.4.29, MariaDB 10.1.30, PHP 7.1.14, phpMyAdmin 4.7.7, OpenSSL 1.0.2, XAMPP Control Panel 3.2.2, Webalizer 2.23-04, Mercury Mail Transport System 4.63, FileZilla FTP Server 0.9.41, Tomcat 7.0.56 (with mod_proxy_ajp as connector), Strawberry Perl 7.0.56 Portable
Unfortunately this doesn't solve the problem. PS: i have another laravel project with the same permissons for storage folder and it works fine !
Jeah, i'm researching here. seems that it have something to do with windows and Laravel-Medialibrary. Take a look here. I try to figure out a solution.
@MsFoued try giving full write access to storage folder that will solve the permissions issue. Encountered same while using XAMPP on Windows & Linux, giving full write access fixed it.
@ajitbohra can not confirm. still the same issue.
following
@ajitbohra same here
@cracker182
i tried those 2 instructions : dd(touch('delete.me')); === > return true dd(touch('delete.')) ===> Exception touch(): Unable to create file delete. because Permission denied i think that windows doesn't allow files without extensions
PS : it works fine on Ubuntu
@MsFoued yes, had the same result. seems to be a error with the package spatie/laravel-medialibrary. i investigate further.
@MsFoued @cracker182 following will cross-check on windows mission as I remember didn't face the issue though it was long back. If needed will check with guys at spatie for the same.
I have same problem on windows (xampp on local server). Please help me.
I have some issues when uploading user photo it show image is not readable
I got the same error Actually, windows can't touch() a file without extension. (Don't know why?)
So in the MembersController
The store action
I edited
if ($request->hasFile('photo')) {
$member->addMedia($request->file('photo'))->usingFileName('profile'.$member->id.$request->photo->getClientOriginalExtension())->toMediaCollection('profile');
}
To
if ($request->hasFile('photo')) {
$member->addMedia($request->file('photo'))->usingFileName('profile'.$member->id.".".$request->photo->getClientOriginalExtension())->toMediaCollection('profile');
}
I just added a dot before the extension
Fixed in 4785302a517590afdfef57aeb67699ccebd3dd04
@alouini333 thanks for catching that
i am getting this error message when i try to upload profile pic to my user