Moodle data - cannot take the file from there

Moodle data - cannot take the file from there

by Jerin Das -
Number of replies: 2

Hi Team ,

I am using Moodle 2.9 version. I have uploaded pdf file into Moodle . I have checked the database also. There the entry for the file is entered and the file is also saved in moodledata folder  in the proper way. But while accessing the file , its showing as error  "The requested file could not be found ". 

I can access other files from moodledata as usual. The problem only occurred with my custom upload

Please help me to go forward.

Thanks in advance


Regards,

Jerin

Average of ratings: -
In reply to Jerin Das

Re: Moodle data - cannot take the file from there

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Does your plugin implement a 'pluginfile' function to do any necessary security checks and send the file? (as outlined in https://docs.moodle.org/dev/File_API#Serving_files_to_users )

If not, you will always see the 'file not found' response (as the lack of that function indicates that no users should be accessing files with your plugin as the 'component').


In reply to Davo Smith

Re: Moodle data - cannot take the file from there

by Jerin Das -

Thanks Davo. Its worked !!!.. I have updated lib.php.

Once more Thanks for your quick support.


Regards,

Jerin