• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bypassing upload_max_filesize

Hi everyone.

I have a big problem. I am creating an application, that should allow uploads of PDF files that are around 25 MB long, the only problem is that it's currently set to 2M, and the access level is 6, so there's no way for me to override it. Can anyone think of an elegant solution around this problem that doesn't involve and FTP client?

Many thanks in advance.

Is using a perl script an option?
If so, have a look at: http://www.raditha.com/megaupload/upload.php

I'd rather not, but it appears that I may have run out of possible options. The thought had occured to me, but I wasn't sure how difficult it would be to integrate with my CodeIgniter app (as I'm a bit of a Perl noob). I guess I should start looking into it.


I'm not sure how I can integrate this with CI and form validation. Any suggestions?

After the upload is finished, the perl script could send a post request to your CI controller containing the filename and all other form data.
Or you try to integrate perl and php like it is done here: http://www.linuxjournal.com/article/9282

I don't believe I can install CPAN modules, so the second option is out.

As for the first option, I have no idea how to handle permissions, so that only authenticated users or admins can upload a file. I also don't have a clue how to pass cookie data from one script to another. Sorry for being thick.

I am not a perl guru myself, but you can access cookie data in perl using CGI::Cookie.

After uploading finished, send the post request using LWP::UserAgent and HTTP::Request.

Regarding permission handling, you can read the cookie and query a database just like you do in php.

But as this all seems pretty hard to do (and far from "elegant" as you requested above), I'd rather look for an option to increase your upload_max_filesize setting.

I think I'm just going to have to just resort to FTP. Sad

Thanks a lot for your help, though.

PistolPete, meet Pissed Ole Fuzzy. Tongue

Does anyone know if there's some kind of Java applet that can split files up and send them in pieces?

If you want to use a java applet, you could use one to upload to ftp as well (without splitting).

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.