csckid Posted July 16, 2010 Share Posted July 16, 2010 The following code doesn't work. Is there any way to set this value? <input type='file'name='image' value='c:/me.jpg'> Or can I set upload file path of client pc using php? Link to comment https://forums.phpfreaks.com/topic/207936-set-file-path/ Share on other sites More sharing options...
trq Posted July 16, 2010 Share Posted July 16, 2010 You cannot set the path to a file the a user is going to upload. It must be done by the client. Link to comment https://forums.phpfreaks.com/topic/207936-set-file-path/#findComment-1086996 Share on other sites More sharing options...
Wolphie Posted July 16, 2010 Share Posted July 16, 2010 I don't think the file upload form element allows you to set a default value. If it did, this would be a major security issue since it would allow attackers to automatically select a file in the form element and then hide the element from the user, making them unaware that a file is being uploaded when they send the form. Link to comment https://forums.phpfreaks.com/topic/207936-set-file-path/#findComment-1086998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.