Working with large files

Working with large files

by Nathan Hammond -
Number of replies: 4

Hi,

Can somebody direct me to posts (or answer directly) about how to work with large files (greater than 2MB).  Some of which might be between 10-100MB. 

I put in an honest effort to search the forum but didn't yield many answers.  I know I can increase the php.ini upload limit, though I don't know how high my web service provider will allow that to go (8, 16MB, or higher?)

My workaround right now is to place these large files on a webserver (outside of moodle) and simply link to them.  Is that a pretty good solution?

Average of ratings: -
In reply to Nathan Hammond

Re: Working with large files

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
You can also look at the course number and upload these large files with ftp to your moodle data folder in the root of the right course number, but that is a quick and dirty hack.
In reply to Nathan Hammond

Re: Working with large files

by Jesse Thorstad -
Nathan,

Your solution works fine. Assuming you have FTP access to your Moodle site, you can also simply FTP the larger files to that server. I've done that a few times, but if I remember correctly, it's kind of tricky finding the exact directory in which to place them.

Do a search for .htaccess as well. That's another way to change the upload limit.

Jesse
In reply to Nathan Hammond

Re: Working with large files

by Debby Kilburn -
I'm setting up a multimedia course where we would like the students to be able to upload their files. Running into the same 2MB limit and would like to find a solution.

Debby
In reply to Debby Kilburn

Re: Working with large files

by Gary Payne -

Use the .htaccess method - it works a treat!

If you are unsure how to, use a text editor such as Notepad and type the following line of code in:

php_value upload_max_filesize 8000000

Change the numbers at the end (8000000) to the max file size you want to be able to upload. i.e. 8000000 = 8Mb, 2000000 = 2Mb, 50000000 = 50Mb, etc.

Save the file as .htaccess nothing else. If your text editor adds .txt on the end, rename the file .htaccess and then FTP the file into your web site's root.

I have attached a sample .htaccess file for you. You will notice once done, that when you set-up the course or update the course that the max file size choice in the drop-down, now reflects the new max file size. This obviously only works if .htaccess is permissible at the root and in almost all cases it is, no loss in finding out though is there!