SWFUpload Component

I have been looking for this kind of component for a while and it just deals almost everything that I wanted for in an uploader component. For more details about this component, you may check James Revillini’s website, the author of the component, and/or the bakery. I also found his kit very useful. The kit is for multiple uploads and I already liked the design. I haven’t had the time to change the layout though. As for the changes that I mentioned, here is the list:

added mime type validation, I got the idea from Chris Partridge’s File Handler component but now I couldn’t find the link in cakeForge. Basically, it checks if the uploaded file is an accepted one. This is not mandatory so you can leave the checking if you don’t want to. Sample codes below.

added the function deleteRecentUpload() to be able to easily delete the image once the processing database was not successful.

added the option to choose the renaming scheme. Sometimes I need to rename the file to random characters. You can set the var $random_word_length to change the number of characters generated. You can choose a partial or full change or random characters by changing the var $filenameType. Values accepted are default, full or partial. When I say partial, the original filename will have a prefix of random characters. You can have your own renaming scheme too, check the findRandomFilename().

Like this:

Related

This is tight. I really like the improvements. I’ll definitely grab this to use as my platform for the next release. I’m glad my software gave you the starting point you needed. I haven’t been over to the SWFUpload site in awhile so I have to go read up on what’s new with the uploader itself. Peace!

When I try to set the uploadpath var from my controller it does not work. For example:

$this->SwfUpload->uploadpath = ‘/var/www/app/webroot/uploads/’

If I set the $uploadpath variable directly in the component it seems to work. The only problem with that is if you want to have different upload directories depending on where you are calling the component from.

I am missing something simple here? Thanks for your help and some great additions to a great component.