Failing to upload files with, and probably because of, peculiar names

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:

example

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

longer
example
here

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, 20.0.5): 20.0.7
Operating system and version (eg, Ubuntu 20.04): Mint 19
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.4): 7.4

The issue you are facing:

Two of my files cannot be uploaded into my server.

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

Steps to replicate it:

  1. Place
    Александра Прокошина Пётр Казьмин Женская группа Государственного академического русского народного хора имени - И кто его знает?.mp3
    and
    Оркестр Государственного академического Большого театра СССР Геннадий Рождественский Хор Государственного академ - Интернационал.mp3
    into the sync folder.
  2. Wait for the automatic upload.
  3. The former return “Connection closed”, and the latter “500 Internal Server Error”. Both can’t be uploaded, but won’t block the syncing process.

Hi dzx-dzx,

I tried reproducing this and found the following error in my NC log:

"Message": "fopen(/path/to/my/nc/storage/Александра Прокошина Пётр Казьмин Женская группа Государственного академического русского народного хора имени - И кто его знает?.mp3.ocTransferId1626346688.part): failed to open stream: File name too long at /var/www/html/nextcloud/htdocs/lib/private/Files/Storage/Local.php#355"
"Message": "fopen(/path/to/my/nc/storage/Оркестр Государственного академического Большого театра СССР Геннадий Рождественский Хор Государственного академ - Интернационал.mp3.ocTransferId608123977.part): failed to open stream: File name too long at /var/www/html/nextcloud/htdocs/lib/private/Files/Storage/Local.php#355"

It looks like the file name is too long for both of these files. If you reduce the file name size, it should work. This is however rather an OS / FS (Operating System / File System) issue then a Nextcloud issue, because Nextcloud can only work with what the OS/FS allows.