Hello,
I have installed Nexcloud AIO (Version 31) on an Unraid server and I am trying to create a direct download link to files in a shared folder by their filename. After searching a bit I found a method mentioned here.
But when I try that on my AIO installtion I get a internal server error.
The link I used looks like this: https://nextcloud.domain.example/s/mkkYSec7pjfSbZH/download?path=&files=Vineyard.jpg
I have shared the default Photos folder and can successfully access that folder when I just open the standard link without url parameters. When I try to directly open/download the Vineyard.jpg example image I see the following error in the server log.
{
"reqId": "zxCi2fALl1Ry912IsoTX",
"level": 3,
"time": "2025-04-13T12:09:30+00:00",
"remoteAddr": "192.168.178.2",
"user": false,
"app": "index",
"method": "GET",
"url": "/s/mkkYSec7pjfSbZH/download?path=&files=Vineyard.jpg",
"message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/Node/Node.php on line 321 in file '/var/www/html/lib/private/Files/Utils/PathHelper.php' line 36",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"version": "31.0.0.18",
"exception": {
"Exception": "Exception",
"Message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/Node/Node.php on line 321 in file '/var/www/html/lib/private/Files/Utils/PathHelper.php' line 36",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 161,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Files_Sharing\\Controller\\ShareController"
},
"downloadShare"
]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 307,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Files_Sharing\\Controller\\ShareController",
"downloadShare",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"filename": "",
"token": "mkkYSec7pjfSbZH",
"_route": "files_sharing.share.downloadshare"
}
]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1018,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/s/mkkYSec7pjfSbZH/download"
]
},
{
"file": "/var/www/html/index.php",
"line": 24,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 146,
"Previous": {
"Exception": "TypeError",
"Message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/Node/Node.php on line 321",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/Files/Node/Node.php",
"line": 321,
"function": "normalizePath",
"class": "OC\\Files\\Utils\\PathHelper",
"type": "::",
"args": [
null
]
},
{
"file": "/var/www/html/lib/private/Files/Node/Folder.php",
"line": 49,
"function": "normalizePath",
"class": "OC\\Files\\Node\\Node",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/lib/private/Files/Node/Folder.php",
"line": 107,
"function": "getFullPath",
"class": "OC\\Files\\Node\\Folder",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/apps/files_sharing/lib/Controller/ShareController.php",
"line": 403,
"function": "get",
"class": "OC\\Files\\Node\\Folder",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 200,
"function": "downloadShare",
"class": "OCA\\Files_Sharing\\Controller\\ShareController",
"type": "->",
"args": [
"mkkYSec7pjfSbZH",
"Vineyard.jpg",
""
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 114,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Files_Sharing\\Controller\\ShareController"
},
"downloadShare"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 161,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Files_Sharing\\Controller\\ShareController"
},
"downloadShare"
]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 307,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Files_Sharing\\Controller\\ShareController",
"downloadShare",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"filename": "",
"token": "mkkYSec7pjfSbZH",
"_route": "files_sharing.share.downloadshare"
}
]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1018,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/s/mkkYSec7pjfSbZH/download"
]
},
{
"file": "/var/www/html/index.php",
"line": 24,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/lib/private/Files/Utils/PathHelper.php",
"Line": 36
},
"message": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/Node/Node.php on line 321 in file '/var/www/html/lib/private/Files/Utils/PathHelper.php' line 36",
"exception": [],
"CustomMessage": "OC\\Files\\Utils\\PathHelper::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/Node/Node.php on line 321 in file '/var/www/html/lib/private/Files/Utils/PathHelper.php' line 36"
},
"id": "67fbaa94b9c7a"
}
I also have a managed nextcloud installation at Ionos, where I have no problems linking to a file with the above method. Ionos uses Version 28.0.7.5 of Nextcloud.
I am wondering if there is a setting or something I am missing to make this feature work?
Could it be that it has been removed, since Ionos is using an older version?
Does anybody have an idea what could be wrong or what I need to check on my server to resolve the error?
Thanks in advance