Cannot upload images to nextcloud

I am using Nextcloud 15.

It’s great and amazing, but I am facing issues with images Upload.

When uploading a file a message appears: “An unknown error has occurred”.

I can upload other filetypes like mp3 pr txt or pdf.

But not png or jpg.

I tried doing it via android app but it did not upload images neither.

There is no message in the logs.

How may I debug this issue?

Using CentOs 7 and PHP 7.02

For unkown errors, it is the best to check your logfiles (Nextcloud, webserver, system). From Nextcloud-side, an app could prevent certain extensions to be uploaded: (by default not enabled and configured to do this)

Could also be on the webserver configuration, or other security modules (centos->SELinux). But if they do something, you should find some traces in the logfiles (perhaps some loglevels must be changed to get more meaningful messages).

Try sudo apt-get install php7.0-gd

Same problem here. No matter where I upload from - webdav, web, or iOS app - images trigger that error. Haven’t found errors on nginx nor on nextcloud logs.

In my case I found the problem - I was using a reverse proxy on nginx, and I had to set the client max upload size on its config.


this answer really helped me out

Thank you @francisaugusto, This appears to be the same issue on my instance.

I have the same set as you, so I added the line below, into my nginx.conf file:

client_max_body_size 100M;

and reload the nginx:
nginx -s reload

and done :slight_smile:

thank you :+1:

Hi. I’m exoirnicng this probloem on two different cpanel hosts. Does anyone know the soloution. I am using Nextcloud 20.0.4

I assumed you have a reverse proxy from your nextcloud, did you tried the change the “client_max…” from nginx.conf file as we did on this post ?