General developer forum

Uploading Files as a resource: Moodle 3.3+

 
Picture of Dave Emsley
Re: Uploading Files as a resource: Moodle 3.3+
Particularly helpful Moodlers

As I have now uploaded files what I think is successfully I cannot retreive them.

The document https://docs.moodle.org/dev/File_API#Serving_files_to_users says to use:

$url = moodle_url::make_pluginfile_url($file->get_contextid(), $file->get_component(), $file->get_filearea(), $file->get_itemid(), $file->get_filepath(), $file->get_filename());
Which gives me the URL: 192.168.1.40/~learndom/moodle/pluginfile.php/33/mod_presentationupload/presentation/47/Slide3.JPG which to me looks plausible given the entry in the mdl_files table is:


350 891e79ff764313389e1a0e9b3e242a637ad81dc6 d221f4033ea671012b19b132310850a372eb3979 33 mod_presentationupload presentation 47 / Slide3.JPG 2 66383 image/jpeg

Sorry can someone shine a light on this as I'm stumped, again.

Cheers

Dave


 
Average of ratings: -