So Where are My Uploaded Images? Version 2.5

So Where are My Uploaded Images? Version 2.5

by Glen Draeger -
Number of replies: 3

I'm new to Moodle. Have been creating my courses. I want to download all the images I've been uploading to keep as a backup.......I can't find them. I don't see them in any directory or folder. When I look at the paths in the html....I don't see any of those folders on the server. The images work. Where are they?

Thanks.

Average of ratings: -
In reply to Glen Draeger

Re: So Where are My Uploaded Images? Version 2.5

by G. M. -

Hi Glen,

That's actually quite an interesting story:

* File API internals.
* Moodledata directory.

Average of ratings: Useful (1)
In reply to G. M.

Re: So Where are My Uploaded Images? Version 2.5

by Glen Draeger -

Okay...so I still feel quite lost. Apparently, files are not stored as jpgs or gifs or whatever, they are encoded in someway and stored in moodledata/filedir outside the root of the site. The database information allows for bringing the "files" back to their full glory. Is this correct or have I totally missed it?

In reply to Glen Draeger

Re: So Where are My Uploaded Images? Version 2.5

by G. M. -

Hi Glen,

You almost got it smile Basically:

1. Moodle doesn't encode files --as file content always remains the same, it is never modified.

2. Only the name of the file is modified --with the value of the hash of the file.

3. A two folder structure is created under moodledata/filedir to keep each file. The first directory is named with the first two characters of the file name (the hash value), and the subdirectory is named with the following two characters of the file name.

4. For each file, the original file name and the corresponding hash are stored in the database.

Average of ratings: Useful (1)