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 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: 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.



Average of ratings: -