There is a shared public folder that users use to upload shared documents. Among the shared resources, some users have uploaded outlook email shortcuts to share amongst themselves.
I am attempting to have this email to open in Outlook when user is trying to open the resource on chrome, IE, etc.
Is this achievable?
Here is an example of an email that is saved in the share folder:
The following code is what I am currently doing to have users the ability to view folders on their browsers and open and save documents:
<!--- The following if statement checks if the url wants to be downloaded. If it does, it creates a downloadable link. --->
<cfif structKeyExists(URL, 'method') and URL.method eq 'download'>
<cfset file_name = URL.name />
<cfset path = URL.path />
<!--- The following if statements determine file type. --->
<cfif findNoCase('.doc', file_name) or findNoCase('.odt', file_name) or findNoCase('.rtf', file_name) >
<cfset file_type = 'application/msword' >
<cfelseif findNoCase('.pdf', file_name) >
<cfset file_type = 'application/pdf' >
<cfelseif findNoCase('.xls', file_name) or findNoCase('.xlt', file_name) or findNoCase('.csv', file_name)>
<cfset file_type = 'application/vnd.ms-excel' >
<cfelseif findNoCase('.tif', file_name) >
<cfset file_type = 'image' >
<cfelseif findNoCase('.jpg', file_name) >
<cfset file_type = 'image/jpeg' >
<cfelseif findNoCase('.url', file_name) or findNoCase('.lnk', file_name) >
<cfset file_type = 'text/uri-list' >
<cfelseif findNoCase('.msg', file_name) >
<cfset file_type = 'text/uri-list' >
</cfif>
<!--- The following statements creates a downloadable link of the file. This is done by using cfheader and cfcontent --->
<cfheader name="Content-Disposition" value="inline; filename=#file_name#">
<!---Check if file type is available. If available, show type. --->
<cfif isDefined("file_type") >
<cfcontent type="#file_type#" file="#path#\#file_name#">
<!--- If file type is not found, display file anyways. --->
<cfelse>
<cfcontent file="#path#\#file_name#">
</cfif>
<cfabort>
</cfif>