{
"url": "/apps/text/attachment/upload?documentId=",
"exception": {
"Exception": "OCP\\Files\\NotFoundException",
"Message": "File has no owner",
"Code": 0,
"Trace": [
{
"file": "/opt/nextcloud/apps/text/lib/Service/AttachmentService.php",
"line": 287,
"function": "getAttachmentDirectoryForFile",
"class": "OCA\\Text\\Service\\AttachmentService",
"type": "->"
},
{
"file": "/opt/nextcloud/apps/text/lib/Controller/AttachmentController.php",
"line": 144,
"function": "uploadAttachment",
"class": "OCA\\Text\\Service\\AttachmentService",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "uploadAttachment",
"class": "OCA\\Text\\Controller\\AttachmentController",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/opt/nextcloud/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/opt/nextcloud/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/opt/nextcloud/apps/text/lib/Service/AttachmentService.php",
"Line": 436,
"message": "Upload error",
"exception": {},
"CustomMessage": "Upload error"
}
}
Describe the bug
Currently it's not possible to attach a file to a federated share of a markdown file.
We should disable the corresponding buttons in the ui and add a tooltip explaining why no files can be attached.
On the server side attempting to attach a file throws 'File has no owner' in the getAttachmentDirectoryForFile function.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The button should be disabled and a tooltip should explain why.
Screenshots
Will be added later.
Server details:
Logs
Nextcloud log (data/nextcloud.log)
{ "url": "/apps/text/attachment/upload?documentId=", "exception": { "Exception": "OCP\\Files\\NotFoundException", "Message": "File has no owner", "Code": 0, "Trace": [ { "file": "/opt/nextcloud/apps/text/lib/Service/AttachmentService.php", "line": 287, "function": "getAttachmentDirectoryForFile", "class": "OCA\\Text\\Service\\AttachmentService", "type": "->" }, { "file": "/opt/nextcloud/apps/text/lib/Controller/AttachmentController.php", "line": 144, "function": "uploadAttachment", "class": "OCA\\Text\\Service\\AttachmentService", "type": "->" }, { "file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 230, "function": "uploadAttachment", "class": "OCA\\Text\\Controller\\AttachmentController", "type": "->" }, { "file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 137, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->" }, { "file": "/opt/nextcloud/lib/private/AppFramework/App.php", "line": 184, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->" }, { "file": "/opt/nextcloud/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\\AppFramework\\App", "type": "::" }, { "file": "/opt/nextcloud/lib/base.php", "line": 1069, "function": "match", "class": "OC\\Route\\Router", "type": "->" }, { "file": "/opt/nextcloud/index.php", "line": 39, "function": "handleRequest", "class": "OC", "type": "::" } ], "File": "/opt/nextcloud/apps/text/lib/Service/AttachmentService.php", "Line": 436, "message": "Upload error", "exception": {}, "CustomMessage": "Upload error" } }