Forums | Mahara Community

Support /
what folder the files are upload by users?


anonymous profile picture
Account deleted
Posts: 31

16 December 2010, 10:43

Hello

can you tell me in what folder the files are upload by users?

 

Thanks

anonymous profile picture
Account deleted
Posts: 214

16 December 2010, 11:26

Hi Sergio,

This will depend upon your installation. When you set up mahara, you will have created a config.php. Uploaded data is stored in the uploaddir subdirectory of $cfg->dataroot

Most files are stored in the artefact/file directory within the uploaddir.

Andrew

anonymous profile picture
Account deleted
Posts: 31

16 December 2010, 14:39

Hello Andrew,

In the folder Artifact/file of my dataroot, exists file is no extension, those files that are within this folders net are the files uploaded by users?

Ruslan Kabalin's profile picture
Posts: 146

21 December 2010, 9:36

Hi Sergio,

Uploaded files do not have their original names in Mahara, they are stored in "hashed" directory structure for better perfomance on large scale sites. On the uploading, the file is renamed to the ID of its corresponding artefact and put in the sub-directory within artefact/file/originals/. The name of the sub-directory is the recidual of <artefact_id> divided by 256. So the full path to the file is:

<$cfg->dataroot>/artefact/file/originals/<artefact_id> % 256/<artefact_id>

anonymous profile picture
Account deleted
Posts: 31

21 December 2010, 15:54

HI
Thanks for the explanation, I now understand better how work Mahara

Gordon McLeod's profile picture
Posts: 194

19 January 2013, 5:24

Hi Ruslan,

It seems a slightly odd way of distributing files into directories - but has it's own internal logic. Unfortunately I've been trying to apply the structure to how files appear in my own maharadata folder and it isn't making any sense. I've been having problems with indexes in the database and wonder if the issue is that my maharadata folders have been messed up - or if the content is in the right place and I've just misunderstood the filepath that you outlined.

e.g. In folder originals/255 I've got files that include numbers  2047, 11007 & 24063 - dividing those numbers by 256 suggests they should all be in completely different folders. Can anyone offer some insight that would explain how these files end up together?

Thanks, Gordon.

6 results