Nextcloud version (eg, 20.0.5): 24
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.53
PHP version (eg, 7.4): 8.0.18
The issue you are facing:
I was uploading 27GB of photos using my pc with nextcloud client 3.5 installed. the photos are around 17MB each but I have smaller or large ones. One of the photos for some reason just gave this error out of the blue and I was seeing “connection closed” for this particular photo on the nextcloud client. The other photos uploaded without a hitch. This particular photos is 7.3MB.
I tries uploading the photo through the web interface but I get this error ‘ Error while copying file to target location (copied: -1 bytes, expected filesize: 7627145 bytes’. I tried upload the same file with a different name and it uploads and then I tried renaming it to the original name of the photo and I get an error and does not let me rename it. I tried uplaoading from the phone and another pc to no avail.
How can I fix this? Is this a problem with the database?
Is this the first time you’ve seen this error? Y
The output of your Nextcloud log in Admin > Logging:
Fatal Sabre\DAV\Exception: Error while copying file to target location (copied: -1 bytes, expected filesize: 7627145 bytes)
Error Sabre\DAV\Exception: Error while copying file to target location (copied: -1 bytes, expected filesize: 7627145 bytes)
Error Error: file_put_contents(/mnt/sdcard/photos/xxxxxx.jpg.ocTransferId341447024.part): Failed to open stream: Invalid argument at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#29
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'XXXXX',
'passwordsalt' => 'XXXX',
'secret' => 'XXXX',
'trusted_domains' =>
array (
0 => 'XXX',
1 => 'XXX',
),
'datadirectory' => '/home/Nextcloud',
'dbtype' => 'mysql',
'version' => '24.0.0.12',
'overwrite.cli.url' => https://mydomain.com/nextcloud
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'XXX',
'dbpassword' => 'XXX',
'installed' => true,
'htaccess.RewriteBase' => 'mydomain.com/nextcloud',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'maintenance' => false,
'app_install_overwrite' =>
array (
0 => 'files_readmemd',
),
'updater.secret' => 'XXX',
'theme' => '',
'loglevel' => 2,
);