Integration of Nextcloud Repository gives "Cannot download this file" Error

Integration of Nextcloud Repository gives "Cannot download this file" Error

by dharmik dharmik -
Number of replies: 0

Hello,

Once I had both Nextcloud and Moodle installed on one server (nginx) and at that time everything was working fine with nextcloud integration in moodle. Now I have 2 server in which 1 is for Nextcloud that uses apache and another is for Moodle which uses nginx. Also I upgraded both nextcloud and moodle after migration. Now I have problem adding files from Nextcloud in moodle.

I am getting following error.

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: XX.XX.XX.XX server: class.studianova.org, request: "POST /course/modedit.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "class.studianova.org", referrer: "https://class.studianova.org/course/modedit.php?add=resource&type=&course=7&section=0&return=0&sr=0"

Nextcloud Version: 22.2.0 ( Upgraded from 22.1.0)

Moodle:  Moodle 3.11.3+ (Build: 20211026)


Is this issue because of 2 different server?

Or 

upgrade from older version to newer of nextcloud? https://github.com/nextcloud/server/issues/28261


Average of ratings: -