Copy link to clipboard
Copied
I've added a cfinput tag to a form that is intended to choose an image file to upload to a server. If I set the input to be of type="text", the initial value shows up as I expect. If I set the input back to type="file", I can't get it to show the initial value. Is there a trick I should know?
I've tried using the full path:
<cfinput name="FeaturedImage"
value="C:\ColdFusion9\wwwroot\cpac\images\events\#FeaturedImage#"
type="file"
size="60">
as well as the relative path:
<cfinput name="FeaturedImage"
value="#FeaturedImage#"
type="file"
size="60">
Copy link to clipboard
Copied
This is not a CF thing, it's an HTML thing. Most browsers do not support givin an initial value to <input type="file" /> control. This is because of the perceived security risk in populating a control that accesses the local client file system.
--
Adam
Copy link to clipboard
Copied
Ah, I didn't know that. It seems as though Dreamweaver should be smart enough to at least let you know that.
Tools, helpful sometimes, sometimes not.
Thanks!