Uploading large-sized files in Textpattern

Blogged into & on 09/26/2005 | comment

Textpattern 4.01 has a host of amazing new features (many of which were previewed in RC3), including file uploads.

For people who want to upload PDF documents, the file upload feature is fantabulous. I thought the same thing until I found out that most web hosts only allow max file uploads of 2 megs.

Until I can convince my webhost to up this figure, here’s what I’ve been doing to get around this hassle:

  1. Upload a bogus PDF file through Textpattern, but name it whatever you called the large-sized PDF you want to upload.
  2. Upload the real PDF via FTP into the “files” directory on your server, overwriting the bogus file.

Because Textpattern stores a reference to the PDF by file name in the database, Textpattern will now reference the large-sized PDF you just uploaded.

I know this is a bit hackish, and it practically defeats the purpose, except in cases where you’ve got a bunch of PDFs in a category which you are using Textpattern to generate a list of somewhere on your site.

If you’ve found a better solution, or web host, please feel free to share yours.

If you are using Internet Explorer for the MAC, you'll notice this website looks a little strange. That's because we've chosen not to provide full CSS support for that browser. All content is still accessible, it's just not as pretty - but neither is your browser. For the full meal deal, we recommend upgrading your web browser.