sbwalker:One of the major enhancements in the latest version is that we have abstracted the application from the file system for document storage. This provides the flexibility for managing files in different ways which were not possible in the past ( ie. secure file storage, database storage ). It also provides much better security as it allows us to consistently enforce our security model related to folders and files. As part of this enhancement, we are now consistently using the database as the reference for information related to files and folders ( the Files and Folders database tables ). In the past we referenced the database in some cases and the file system in others - resulting in inconsistencies. For example, you could FTP a file to the portal home directory and then link to it from your modules - even if the file was not identified in the Files database table. In the latest version, the files must be identified in the database in order for the system to handle them properly.
The LinkClickUrl() method now returns LinkClick.aspx?link=filename.ext&tabid=##. But this should not cause any issues for modules as long as the FilerServerHandler is properly configured in the web.config ( as per the comments earlier in this thread ). You will see the following code in the FileServerHandler:
If UrlType = TabType.File And URL.ToLower.StartsWith("fileid=") = False Then
' to handle legacy scenarios before the introduction of the FileServerHandler
Dim objFiles As New FileController
URL = "FileID=" & objFiles.ConvertFilePathToFileId(URL, _portalSettings.PortalId)
End If
This logic will take the LinkClick.aspx?link=filename.ext&tabid=## URL, locate the associated file in the database, and serve the file. The only problem which you may run into is a situation where your files are not properly identified in the database - in which case the logic above would fail to locate the file. To deal with this problem, you should use the Synchronize option in the File Manager to ensure all of your files are identified. Please note that the synchronize job will only process files which have an allowable extensions as defined in the Host Settings. So if you have manually copied files into your portal folders which have restricted file extensions, you will need to add the extension to the Host Settings ( otherwise you are bypassing the application's security model - which is never a good idea ).
This is surely a great enhancement and would benefit all.
However, I guess, we can have provision at least for the time being, to have an option to use the old method too. Like we may have an option, some where in the Admin settings or may be and optional argument in the LinkClickUrl method to use the older system too. viz
LinkClickUrl(ByVal FileId as string, ByVal LegacyCompliant as Boolean = True)
so that, existing modules would work all ok, without modification and the newer modules would incorporate the newer model to take advantage of the new Security feature.
I am concern, because there are many many module develoers (including me

) who have used the LinkClickUrl() in code to extract the filename and rebuilding the URL in many modules, in many places. While mending this code to comply to this new system is a daunting huge task (which ofcourse we would do, since it is necessary), the Module would simply break, in the new 3.3/4.3. We need to have breathing space, so that we update the code, and may be in 4.3.2, you remove this provision. But currently we all are stuck, since all those modules have to be upgraded at the earliest, otherwise it would break in new system.
Please help