Need Static URL for Files Uploaded to custom DocumentType

Gregg Duncan asked on February 24, 2015 17:23

We are on Kentico 7. We have created a custom PoliciesAndProcedures document type. One of the fields on that document type is an upload of a Word Document that is the actual written Policy. We need to be able to link to these policies and procedures from sites outside of Kentico. The problem is that anytime the document is updated a new GUID is created for the file, which changes the URL for the Policy, breaking all the links to it.

The current set up for this Field is:

    Column Name: Document
    Attribute Type: File
    Allow Empty Value: False
Field Appearance:
    Field Caption: Document
    Form Control: Upload File

Is there any way create a link to an attachment like this that is static so that the URL doesn't change when the file is updated? Is there a different form control that can be used besides the "Upload File" that will accomplish this?

Any help would be greatly appreciated.

Correct Answer

Gregg Duncan answered on February 24, 2015 17:46

Well, Nevermind... It turns out you can update the attachment without changing the URL as long as you simply upload a new document without deleting the existing one. We will have to retrain our content person to stop deleting the file before uploading a new one. But the current set up will work.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on February 24, 2015 17:47

Yes, you can click the update button, which is not easily identified unless you hover over it. Good luck!

0 votesVote for this answer Mark as a Correct answer

Gregg Duncan answered on February 24, 2015 17:54

Brenden, That's what threw us off. There is no update button on an "Upload File" form control.

It only has a single button labelled "Choose File". Next to the uploaded file you have the edit pencil and the delete "x" but there is no update button. If you click the 'X' and delete the file then upload another one it gets a new GUID. If, however, you simply click the "Choose File" button and select the updated file and click "Save" it updates the attached file without changing the GUID. But this functionality is not intuitive.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.