Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when uploading photos #26

Closed
fouedmoussi opened this issue Mar 14, 2018 · 14 comments
Closed

Error when uploading photos #26

fouedmoussi opened this issue Mar 14, 2018 · 14 comments
Labels
bug Something isn't working support help getting things work
Milestone

Comments

@fouedmoussi
Copy link

i am getting this error message when i try to upload profile pic to my user

capture

@ajitbohra ajitbohra added support help getting things work error preventing application or feature from running labels Mar 14, 2018
@cracker182
Copy link
Contributor

cracker182 commented Mar 14, 2018

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.

@fouedmoussi
Copy link
Author

fouedmoussi commented Mar 14, 2018

@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 !

@cracker182
Copy link
Contributor

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.

@ajitbohra
Copy link
Member

@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.

@cracker182
Copy link
Contributor

@ajitbohra can not confirm.
image
still the same issue.

@ajitbohra
Copy link
Member

following

@fouedmoussi
Copy link
Author

@ajitbohra same here
capture

@fouedmoussi
Copy link
Author

@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

@cracker182
Copy link
Contributor

@MsFoued yes, had the same result. seems to be a error with the package spatie/laravel-medialibrary. i investigate further.

@ajitbohra
Copy link
Member

@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.

@awolad
Copy link

awolad commented Mar 24, 2018

I have same problem on windows (xampp on local server). Please help me.
error

@Davisy
Copy link

Davisy commented May 4, 2018

I have some issues when uploading user photo it show image is not readable
capture43

@alouini333
Copy link

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

@ajitbohra ajitbohra added bug Something isn't working and removed error preventing application or feature from running labels Aug 21, 2018
@ajitbohra ajitbohra added this to the v1.0.2 milestone Aug 21, 2018
@ajitbohra
Copy link
Member

Fixed in 4785302

@alouini333 thanks for catching that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support help getting things work
Projects
None yet
Development

No branches or pull requests

6 participants