Uploading large-sized files in Textpattern
Blogged into textpattern & web_design 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:
- Upload a bogus PDF file through Textpattern, but name it whatever you called the large-sized PDF you want to upload.
- 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.