Forums | Mahara Community

Support /
Bulk file upload

anonymous profile picture
Account deleted
Posts: 1

21 January 2009, 8:16

Hi all

I'm new to Mahara.  I've spent a lot of time looking for a platform that does what Mahara would seem to do and so am thrilled to have found it. 

The one stumbling block I have is that of migrating my existing resources over to Mahara.  I have 100s of files that would need uploading for my courses and don't really fancy the idea of uploading each one individually through the file upload tool.

Is there a way I can do a bulk file upload to get up and running quicker? I'm more than happy to get my hands dirty with sql if someone point me in the right direction.

Many thanks in advance

Paul Baumgarten

Heinz Krettek's profile picture
Posts: 480

21 January 2009, 9:25

Hi Paul,

welcome in Mahara land. I am a german user and maintain the german langpack 4 Mahara ;-)

About your questions.

No, there is no quick way to do the upload. But you can start the next upload soon after you started one, This will save a little time.

Nigel might give you a detailed answer about hacking mysql.



anonymous profile picture
Account deleted
Posts: 10

21 January 2009, 12:20


I am trying to do just the same but with a bit more "danger" because the files are not from individual users. In some cases I would have groups of owners for the same file and groups of files belonging to a single user.

Is that also your problem? I would be happy to share the results of our tests.

Anyway, as Heinz has said I will contact Nigel.


anonymous profile picture
Account deleted
Posts: 1643

21 January 2009, 20:27

Hi Paul,

Through the UI there's no nice way currently to upload lots of files in one go, though it's a good feature request that I'm sure will be implemented in time.

For now though, that leaves you with inserting them using a script (I guess you would make a one-time script to do it?).

There are a couple of methods that will help you in the Mahara code, they are in artefact/file/lib.php. save_file and save_uploaded_file handle saving files. They move the files into the correct location in dataroot, and make the correct entries in the database. You could make a script that used one of them to add your files.

If you decide to go down that road, I can help you with any specific questions you might have.

4 results