Unable to Connect Moodle with nextcloud Error: Can Not Download File

Unable to Connect Moodle with nextcloud Error: Can Not Download File

Questions : Unable to Connect Moodle with nextcloud Error: Can Not Download File

661

I am trying to get files from Nextcloud to in4codes_api moodle courses with File activity. After in4codes_api selecting files and save, it throws error in4codes_api says can not download file.

I have used OAuth 2 to connect Nextcloud in4codes_api from moodle here is screen shot

I don’t know why Login is not connected. I in4codes_api followed instruction as per in4codes_api guidelines. https://docs.moodle.org/311/en/OAuth_2_services

Here is my error logs:

Error code: cannotdownload * line 380 of /repository/nextcloud/lib.php: repository_exception thrown * line 1283 of /lib/filelib.php: call to repository_nextcloud->reference_file_selected() * line 547 of /mod/resource/locallib.php: call to file_save_draft_area_files() * line 107 of /mod/resource/lib.php: call to resource_set_mainfile() * line 128 of /course/modlib.php: call to resource_add_instance() * line 168 of /course/modedit.php: call to add_moduleinfo()" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: moodle.domain.com, request: "POST /course/modedit.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "moodle.domain.com", referrer: "https://moodle.domain.com/course/modedit.php?add=resource&type=&course=7&section=0&return=0&sr=0" 

Total Answers 1
32

Answers 1 : of Unable to Connect Moodle with nextcloud Error: Can Not Download File

There is a troubleshooting tip here to in4codes_oauth-2.0 try to connect again

https://docs.moodle.org/311/en/OAuth_2_Nextcloud_service#Troubleshooting

When I try to create an access in4codes_oauth-2.0 controlled link I get a “Cannot download in4codes_oauth-2.0 this file” error. This may happen if the in4codes_oauth-2.0 system account is not connected. Go to in4codes_oauth-2.0 Site administration > Server > in4codes_oauth-2.0 OAuth 2 services and try to connect in4codes_oauth-2.0 again the Nextcloud system account.

0