Technical support This forum is closed.
Version 1.x > Technical support > File Handling View modes: 
User avatar
Member
Member
wtijsma - 4/25/2005 9:38:25 AM
   
File Handling
Hi Petr,

About the attachments functionality:

I've implemented this in our version using the full AliasPath for an attachment (also making a cms.file a friendly url aware document type).
This means the file isn't accessible through the ParentPath+filename.

I've also changed the TreeNode not to replace dots with _, so the path is almost the same, with some exceptions.

Would it be possible to take this into account for future development, I would also think it is somewhat more logical to always access a document through it's full aliaspath, in your case the cms.file's alias isn't used.

User avatar
Guest
admin - 4/26/2005 6:48:56 AM
   
Re: File Handling
Hi Wiebe,

Thank you for your post. Have you changed the URL Rewriting engine?

Regarding the replacements of dots with _ : We used this replacement to avoid problems in case the file name contains more than one dot. We could add some web.config parameter to make this optional.

Best Regards,

User avatar
Member
Member
wtijsma - 4/26/2005 9:24:35 AM
   
Re: File Handling
Hi Petr,

No, I've inserted the file retrieval code after the Url Rewriting engine in Global_asax.Application_BeginRequest.

It currently all works well, but I have to modify some parts of your code at every update.

Thank you, Wiebe

User avatar
Member
Member
wahid - 5/19/2005 8:10:42 AM
   
Re: File Handling
Hi guys,

When displaying links to cms.files, I have used the idpath and the SearchResultRedirect.aspx?idpath= to display the file.
Is it what you're talking about Wiebe?

Wahid

User avatar
Member
Member
wtijsma - 5/19/2005 1:13:47 PM
   
Re: File Handling
Hi Wahid,

No, in the Kentico Setup, when using the GetFile.aspx, it retrieves a file by using this syntax:

www.mywebsite.com/{ParentAliasPath}/{FileName}

I've implemented it though using this syntax:

www.mywebsite.com/{AliasPath}/

So it's completely independent of the original filename.
I had to enable the 'FriendlyUrls' property for the CMS file as well.