A file upload class

Posted on August 26th, 2008.

I’ve been quite busy since my last post, and as usual have got distracted while working on a project.

A PHP file upload class

I’m still working on my car dealership application, but I’ve got a bit distracted, and am currently working on a class to make application development a little easier.

The class is going to handle uploading files, and other file-related functions.

I’ve been doing a lot of research into file upload security, because I want the class to be as secure as possible, and so I haven’t wrote a lot of PHP code. However, 119 lines of code isn’t a bad start. So far, I’ve got three methods in mind…

  • name - this will rename the uploaded file for security purposes
  • validate - this method will ensure the file is what it says it is, and that it’s an allowed file type
  • store - this method is actually going to store the file

Once I’ve finished the class, I’m going to make it a CakePHP component, and offer both (the plain PHP class and CakePHP component) for free on this website (and on the CakePHP website). It should be pretty useful.

I expect to finish it no time soon. It’ll be in a state of continual development for as long as I work with PHP. ;)

Other projects

As I mentioned in my last post, I was looking for a “cash cow” or a few of them. Well, I’ve managed to identify a good possible niche, and have acquired a good, keyword rich domain for a site. A little extra cash would be nice. :D

Make a Comment

Make A Comment: ( None so far )

blockquote and a tags work here.

About

RSS

Entrecard

BlogRush

Meta

Liked it here?
Why not try sites on the blogroll...