The filepath is stored in the database, but doesn't seem to be used anywhere. It comes in handy if you want to move files out of the default files folder.
Maybe do a check on stFile.filepath to make sure it's not empty and if it is, then use defaultfilepath.
I'm experimenting with moving files into subfolders of files (we have way too many files to all sit together) and came across the above when testing.
Is there any reason not to use stFile.filepath instead of application.path.defaultfilepath?
Cheers Mark
Environment
IIS6, W2k3, CF7 Standard
Activity
Geoff Bowers
August 9, 2007 at 9:01 AM
download.cfm is a core issue. However, given the change in file properties for 4.0 this is no longer an issue.
Mark Picker
November 5, 2006 at 3:16 PM
Of course I notice after posting the above. The download.cfm file uploaded by David in is using filepath rather than defaultfilepath.
So if his download tag is going to be used in core, this bug can be closed.
On line 104 of \farcry_core\tags\farcry\download.cfm (v1.17.2.1) there is the following:
<cfcontent type="#mime#" file="#application.path.defaultfilepath#/#stFile.filename#" deletefile="No" reset="Yes">
The filepath is stored in the database, but doesn't seem to be used anywhere. It comes in handy if you want to move files out of the default files folder.
Maybe do a check on stFile.filepath to make sure it's not empty and if it is, then use defaultfilepath.
I'm experimenting with moving files into subfolders of files (we have way too many files to all sit together) and came across the above when testing.
Is there any reason not to use stFile.filepath instead of application.path.defaultfilepath?
Cheers
Mark