Can't add new stored files to theme settings

Can't add new stored files to theme settings

by Prashad Wang -
Number of replies: 0

Hi,

I'm trying to add a new stored file to my theme's settings.php, via

new admin_setting_configstoredfile()

I've done this in the past to add a new image to my homepage, retrieving it with $PAGE->theme->setting_file_url()

But today I'm having issues. The file uploads just fine because I can see it after saving my theme's admin page. I can download it from the file drag-and-drop UI. I even tracked down the file in my moodledata/ folder, where it got renamed to a hash (I was able to track it based on its size.) It's there. But, what doesn't work is the url that I get from $PAGE->theme->setting_file_url(). I get redirected to an error page:

Here's the broken file (you can right-click and "Open image in a new tab"):

Does anyone have any insight into why the url from the function call isn't working ?? My server ran out of space a few days ago... could that have somehow clobbered Moodle's file system?

Average of ratings: -