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

[Play] Failed to move uploaded file #217

Closed
valmar opened this issue Dec 25, 2019 · 3 comments
Closed

[Play] Failed to move uploaded file #217

valmar opened this issue Dec 25, 2019 · 3 comments

Comments

@valmar
Copy link

valmar commented Dec 25, 2019

Describe the bug and how to reproduce
Uploading photos to an album fails. I get the error "Upload failed. An error occurred while upload your photo(s). Please try again (Failed to move uploaded file.)

Expected behavior
The photo is uplodaded

What did you do already

  • Search whether a similar issue is already reported?
    Found nothing relevant
  • Check for known workarounds in the issue tracker?
    Found nothing relevant
  • Did you check with guest login?
    Guest cannot upload photos
  • Did you try to reproduce it with https://www.piwigo.org/demo/ ?
    No

Smartphone (please complete the following information):

  • Device: OnePlus6T
  • OS: Android 10

Additional context
Server is a docker container. linuxserver.io, version: arm32v7-2.10.1-ls46 (Standard install)
Client is version 1.0.2 (Play store)

@ramack
Copy link
Contributor

ramack commented Dec 25, 2019

@valmar thanks for the report. We have heard about this before, but so far failed to track it down to the root cause as we cannot reproduce it. What is known today is, that the message "Failed to move uploaded file." with the error code 103 is generated by the piwigo server.
Potentially there due to a transmission problem, due to permissions on the file system or maybe because temporary files have been deleted.

  • Can you upload using the browser?
  • Does it happen always like that or is it sporadic behavior?
  • [Edit: add question]: How big is the image file that you want to upload and what is configured as upload_max_filesize in php.ini on the server?

@plegall do you see a chance to extend the piwigo core and in case of $_FILES["file"]["error"] is set in pwg.images.php also output the error number in there and a different error when is_uploaded_file returns false.

This problem here might also be related to #175...

@ramack ramack added the bug label Dec 25, 2019
@ramack ramack added this to the Release 1.1.0 milestone Dec 25, 2019
@valmar
Copy link
Author

valmar commented Dec 25, 2019

@ramack Thanks for the quick answer. I found the problem. You put me on the right track. The linuxserver.io docker container sets the max_upload size very very low (2M). If I set it to 10M, the upload works (the image size is 6.06MB).

For future reference, the php.ini file is in the container, but not in a volume, so it is not persisted across restarts of the container itself. The right place to set the value is in php-local.ini, which can be found in /config/php/php-local.ini

I just added the following line to the file (I used 1GB as I have enough memory):

upload_max_filesize = 1024M

Currently, the most popular piwigo docker container seems to be the one from linuxserver. So the people that are reporting the error are maybe all using this docker container.

I will now open an issue with the linuxserver.io developers

Thanks again! This can be closed, on my side

@ramack
Copy link
Contributor

ramack commented Dec 25, 2019

increasing upload_max_filesize on the server side is only a workaround. The real fix is in the app to support chunked file upload. See #126.

But anyhow, this will also be fixed in the next release. So I close this one here also.

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

No branches or pull requests

2 participants