Hi Matt,

  That's actually my article and I have since made substantial
improvements and converted it into a full featured plugin.  In the
most recent release of the file upload plugin you'll be able to
configure the plugin to overwrite uploads with the same name instead
of the plugin detecting if the file exists and then attempting to
change the filename as to not overwrite the previously uploaded file.

Here is the documentation/article:
http://www.webtechnick.com/blogs/view/221/CakePHP_File_Upload_Plugin

Here is the source:
http://github.com/webtechnick/CakePHP-FileUpload-Plugin

Hope that helps,
Nick

On May 24, 3:33 am, mattyh88 <[email protected]> wrote:
> Hi,
>
> I'm using this fileupload component (http://bakery.cakephp.org/
> articles/view/file-upload-component-w-automagic-model-optional) on my
> site to manage my PDF files. I can upload and remove PDF files.
>
> But now I'm wondering how I could replace an already uploaded PDF with
> a newer version.
>
> What I've done so far:
>
> I've set the component to use my 'doc'-model.
> I created a docs controller and made an edit action.
> The view for that edit action is a form where they can just select a
> new version of the PDF they wish to update.
> The problem is that I can't remove the old version of the PDF that has
> been selected for update, before uploading the new version.
>
> To further explain the purpose of this:
> It's for a tennis website and I use a PDF to show the schedule of
> play.
>
> Hope you guys can help me ^^
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to