Jump to content

What Would Be The Best Way To Upload Large Files?


Recommended Posts

I have a site where bands can have their own little pages on the website. I'd like to let them upload mp3's and video. As of now they are just e-mailing them to me. I know PHP has a default max upload size of like 2mb. Where would i change this? I have a dedicated server so I can mess with all the settings. I'm also aware that most browser tend to time-out after the files get to big. So...any suggestions on the best way to go about this would be stellar. Thanks!

Link to comment
Share on other sites

You could give them all FTP accounts, that would probably be the best way to transfer large files. And since you will have web pages for the bands, it probably wouldn't be much more work to also create an FTP account when you setup their webpages (or automate that).

Link to comment
Share on other sites

Giving hundreds upon hundreds of bands FTP accounts I don't think is very practical. What about sites like mp3.com (when it was running) that would let people upload mp3's? I remember doing that and it was just a simple form.

Link to comment
Share on other sites

Sorry... didn't realize you were talking about hundreds or more.

 

Anyway, if you want to change the php setting, edit your /usr/local/lib/php.ini file and change the following line appropriately:

 

>upload_max_filesize = 2M                   ; Maximum allowed size for uploaded files

 

Then restart apache and make sure to test with multiple browsers to make sure the larger size is reliable.

Link to comment
Share on other sites

Reminder: you cannot partake in illegal activities with your TCH accounts. If you are dealing with MP3s, make sure they are all legal in what you are doing with them.

 

You are responsible for what your users do with your website, so if they do something illegal, it all comes back to you.

 

That being said... I think the INI setting is where you want to go. I think there's a function in PHP that you can use to set the INI without having to open the INI in an editor, but I'm not sure what it is.

Link to comment
Share on other sites

Hi Robert. Yes, I'm fully aware of the situation as far as legality goes. All of these bands register for a section on the site and then upload thier MP3's...much like MP3.com was.

 

Anywho...speaking of the php.ini...how do i get to it?

Link to comment
Share on other sites

Looks like you can also try using the ini_set function of PHP. This would allow you to set a max per PHP script (so you could have different values for different upload scripts).

 

Or... supposedly it's also possible to set it in .htaccess if you put something like the following in there:

 

># upload_max_filesize
php_value upload_max_filesize 4M

Edited by Big Gorilla
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...