Fetch a file and display it using the File API

Re: Fetch a file and display it using the File API

Davo Smith - මගින්
Number of replies: 0
Core developers ගේ පින්තුරය Particularly helpful Moodlers ගේ පින්තුරය Peer reviewers ගේ පින්තුරය Plugin developers ගේ පින්තුරය

You need to make sure you're using the file_prepare_standard_editor() and file_postupdate_standard_editor() functions ( https://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#editor ) to a) copy files in and out of the draft area when entering / exiting the form and b) rewrite all URLs embedded in the form text data to/from the draftfile.php versions.

Any of the core forms that allow file uploads in the editor do this, so there are lots of examples throughout the standard Moodle code.


ශ්‍රේණිගත කිරීම්වල සාමාන්යය: -