Cannot upload file as access control link

Cannot upload file as access control link

by Manoj Solanki -
Number of replies: 1

Hi all,

I've been trying to integrate Onedrive into our Moodle system in order to be able to upload files into assignments that are of a large file size. Basically over the limit of the current server settings for a file upload.

I've set up the Oauth2 settings within Moodle and registered a new Microsoft app etc. 

When I go to upload a file, and select "Create an access controlled link to the file", I get the following notification exception when trying to upload:

Exception - Call to a member function get_itemid() on boolean

* line 265 of /repository/repository_ajax.php: Error thrown
If I select the other option, to make a copy of the file, it works fine. However, I think I need to have it working as above so it's not stored in the Moodle file system .

Thanks,
Manoj

Average of ratings: -
In reply to Manoj Solanki

Re: Cannot upload file as access control link

by Paul Lindgreen -
Picture of Particularly helpful Moodlers
I have the same issue, moodle 3.5.12 and OneDrive. I can upload a copy of the file but the ACL (access control link) throws the error shown below.

Strangely, I can overwrite the uploaded file with an ACL ?!?!

====error when creating ACL===
Exception - nameAlreadyExists: The specified item name already exists.

More information about this error

×Debug info:
Error code: generalexceptionmessage
×Stack trace:
line 123 of \lib\classes\oauth2\rest.php: core\oauth2\rest_exception thrown
line 674 of \repository\onedrive\lib.php: call to core\oauth2\rest->call()
line 943 of \repository\onedrive\lib.php: call to repository_onedrive->create_folder_in_folder()
line 1063 of \lib\filelib.php: call to repository_onedrive->reference_file_selected()
line 328 of \lib\filelib.php: call to file_save_draft_area_files()
line 229 of \mod\assign\submission\file\locallib.php: call to file_postupdate_standard_filemanager()
line 7096 of \mod\assign\locallib.php: call to assign_submission_file->save()
line 7176 of \mod\assign\locallib.php: call to assign->save_submission()
line 456 of \mod\assign\locallib.php: call to assign->process_save_submission()
line 55 of \mod\assign\view.php: call to assign->view()