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

No such file or directory error on changing users photo #2005

Closed
S1lentium opened this issue Sep 27, 2017 · 3 comments
Closed

No such file or directory error on changing users photo #2005

S1lentium opened this issue Sep 27, 2017 · 3 comments
Labels

Comments

@S1lentium
Copy link

S1lentium commented Sep 27, 2017

Description

unlink(/home/cms/storage/runtime/temp/assets59cb4ae26f1842.80020798.jpg): No such file or directory

Steps to reproduce

When changing users photo, after save i got error.

The problem is on FileHelper::removeFile($fileLocation), because $users->saveUserPhoto already clean temp file.

Trace:

// Did they upload a new one?
if ($photo = UploadedFile::getInstanceByName('photo')) {
    $fileLocation = Assets::tempFilePath($photo->getExtension());
    move_uploaded_file($photo->tempName, $fileLocation);
    $users->saveUserPhoto($fileLocation, $user, $photo->name);
    FileHelper::removeFile($fileLocation);
}

Sorry for my English)

Additional info

  • Craft version: 3.0.0-beta.28
  • PHP version: 7.0
  • Database driver & version: mysql 5.5
@brandonkelly
Copy link
Member

Are you seeing this in the Control Panel or a front-end user profile form?

@S1lentium
Copy link
Author

front-end

@brandonkelly
Copy link
Member

Thanks! Fixed for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants