Filenames for Document Uploads

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 1, 2010   (RSS)

My apologies if this is already covered in the forums somewhere - I have searched but can't find an answer to my query.

I am integrating CMS builder into my client's website to allow restaurant menus to be uploaded in pdf format.

When uploading pdf's CMS builder automatically affixes the filenames with sequential numbering. For example, the first time I upload set_menu.pdf it is uploaded as set_menu_001.pdf. If I want to overwrite the menu, and go into the admin system to remove and then reupload the menu, it uploads as set_menu_002.pdf.

My problem is that I want to create permanent links to the menus from other areas within the website, eg I want to create a permanent link on the homepage from a feature panel to set_menu.pdf (this is just one example). I also release html newsletters for the client that need to have permanent links to items ongoing. Whilst I could create links based on the current upload filenames, as soon as the client uploads a new menu to replace the previous version, the links will be broken.

Is there any way to force the upload manager to drop the affixes?

This needs to be a simple solution for the client to maintain - they are not IT savvy and could easily get in a pickle if I don't provide them with something manageable to maintain. (My apologies if the solution is simple and I'm overlooking something obvious here.)

Many thanks for your help.

Re: [newmediachoice] Filenames for Document Uploads

By Jason - May 31, 2010

Hi,

CMS Builder attaches a postfix such as 001 or 002 when a file of the same name already exists in the upload folder. So, what's happening is that the file set_menu.pdf has already been uploaded at some point, and not removed.

What I would suggest doing is to set up a single record section called Set Menu. All you need here is an upload field to take in the pdf. You can set the maximum number of uploads to 1, so that it can't be duplicated in that section. Also, you can create a new folder inside cmsAdmin/uploads, where your set menu get stored. Set this as the upload directory (make sure to check "Use Custom Directory"). This way, you always know which folder the pdf will be in and that only one section edits that folder. Also, they have to remove the current menu, before being able to upload another.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/