简体   繁体   中英

How to Access Files inside moodledata folder in Moodle

I am new to moodle. I created a file upload in plugin. The file will be uploaded inside /moodledata/logoimage . I don't know how to display the file in UI.

I tried to display like /file.php/logoimage/logo1.jpg in the browser.

It says Invalid Course Id. If I access any image like /file.php/7/logoimage/logo1.jpg where 7 is the course ID the image works.

I didn't quite understand what you are trying to do and I don't think you want to store files in moodledata root, but the first thing you must pay attention to is that file management changed radically changed from version 1.9 to 2.x.

You should look for information in Moodle documentation (http://docs.moodle.org) and in the forums (http://moodle.org/forums/).

Moodle community forums are very active and I am sure you will get answers to your questions very quickly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM