"Unknown Error" Uploading PDF and Zip files

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 27.0.2):
Operating system and version (eg, Ubuntu 22.04.3):
Apache or nginx version (nginx 1.18.0):
PHP version (eg, 8.1):

The issue you are facing:

When uploading a PDF or ZIP file, once the upload completes I receive an “Unknown Error,” that I am not able to resolve.

Is this the first time you’ve seen this error? (Y/N):


Steps to replicate it:

  1. Upload any PDF
  2. Upload any ZIP

The output of your Nextcloud log in Admin > Logging:

No related errors shown

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' => 
  array (
    0 => 'REDACTED',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'REDACTED',
  'dbname' => 'REDACTED',
  'dbhost' => 'REDACTED',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'debug' => false,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => array(
    'host' => 'localhost',
    'port' => REDACTED,

The output of your Apache/nginx/system log in /var/log/____:

No related errors present

nginx sites-enabled configuration
server {
listen 80;
server_name REDACTED;
return 301 https://$host$request_uri;

server {
listen 443 ssl;
server_name REDACTED;

ssl_certificate /etc/letsencrypt/live/REDACTED/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/REDACTED/privkey.pem; # managed by Certbot

root /var/www/nextcloud;

# Main location
location / {
    try_files $uri $uri/ /index.php$is_args$args;
    add_header X-Robots-Tag "noindex, nofollow"; # CHANGE HERE

# Handle PHP files
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+)\.php(?:$|/) {
    include fastcgi_params;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;

# Explicitly handle ocm-provider and ocs-provider
location ~ ^/(ocm-provider|ocs-provider)/ {
	try_files $uri $uri/ =404;
	index index.php;

# Other well-known locations
location = /.well-known/webfinger { return 301 $scheme://$host/index.php$uri; }
location = /.well-known/nodeinfo { return 301 $scheme://$host/index.php$uri; }
location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav/; }
location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav/; }

# Restrict access
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; }


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


Additionally, I found these error in the JS Console. I’ve not found a solution to PDF and ZIP files getting a 403 error.

[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (496965-2022-08-04-03-08-50.pdf, line 0)

I found this nginx log error but cannot find a rule preventing PDF uploads.

2023/09/07 14:53:00 [error] 32269#32269: *63 access forbidden by rule, client: REDACTED, server: REDACTED, request: “GET /data/.ocdata?t=1694112780525 HTTP/2.0”, host: “REDACTED”