Nextcloud version (eg, 12.0.2): 18
Operating system and version (eg, Ubuntu 17.04): Centos
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.16.1
PHP version (eg, 7.1): 72
The issue you are facing:
I upload files via
curl -T <myfile> -u "<share>:<password>" -H 'X-Requested-With: XMLHttpRequest' -X PUT https://<nextcloud-url>/public.php/webdav/
OR
curl -T <myfile> -u "<share>:<password>" -H 'X-Requested-With: XMLHttpRequest' -H 'X-Method-Override: PUT' https://<nextcloud-url>/public.php/webdav/
The file got created in the share. Now i change the file and upload it again (same name). And the file will not overwritten. It will create a secound file called <myfile> (1).ext
Based on https://help.nextcloud.com/t/uploading-to-a-public-link-via-a-script/20294/13
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Create Public upload share with password
- execute command
- change file
- execute command again
The output of your Nextcloud log in Admin > Logging:
[no app in context] Info: Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/public.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null
PUT /public.php/webdav/<myfile>
from 172.16.1.2 at 2020-02-02T17:09:28+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'default_language' => 'de',
'default_locale' => 'de_DE',
'dbtype' => 'mysql',
'version' => '18.0.0.10',
'mysql.utf8mb4' => true,
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'maintenance' => false,
'theme' => '',
'app.mail.transport' => 'php-mail',
'trashbin_retention_obligation' => 'auto,30',
'versions_retention_obligation' => 'auto',
'loglevel' => 1,
'debug' => false,
'logfile' => 'nextcloud.log',
'log_type' => 'file',
);
The output of your Apache/nginx/system log in /var/log/____
:
172.16.1.2 - oiMZ44tD5P9YGwZ [02/Feb/2020:18:13:21 +0100] "PUT /public.php/webdav/<myfile> HTTP/2.0" 201 0 "-" "curl/7.66.0" "-"