Stooney Posted February 27, 2007 Share Posted February 27, 2007 curious if its possible to define which file to upload for a user. So say they run a game which stores stats in a file, is there a way for them to say log in to the site and somewhere in the script just grab the file from their computer and update the stats so they dont have to manually sit there and choose which file to upload? tyty Link to comment https://forums.phpfreaks.com/topic/40381-auto-choose-upload-file/ Share on other sites More sharing options...
shoz Posted February 27, 2007 Share Posted February 27, 2007 curious if its possible to define which file to upload for a user. So say they run a game which stores stats in a file, is there a way for them to say log in to the site and somewhere in the script just grab the file from their computer and update the stats so they dont have to manually sit there and choose which file to upload? No (unless you find a vulnerability of some sort). Nothing would stop a malicious site from having users upload sensitive documents if that were the case. Link to comment https://forums.phpfreaks.com/topic/40381-auto-choose-upload-file/#findComment-195376 Share on other sites More sharing options...
roopurt18 Posted February 27, 2007 Share Posted February 27, 2007 You can't even write a script to save a file to the user's machine. The closest you can get to that is giving them the option of Open or Save As to save information in a cookie. Link to comment https://forums.phpfreaks.com/topic/40381-auto-choose-upload-file/#findComment-195395 Share on other sites More sharing options...
Daleeburg Posted February 27, 2007 Share Posted February 27, 2007 if you are using an form to upload the file then you can just have the default directory for the file (c:/program/dir/file.ext) as the default value for the field, so even though they still have to click upload, they dont have to put in any information. (unless they installed else where in which case you could use a cookie to remember where the file is at and have that inserted in the default value.) Link to comment https://forums.phpfreaks.com/topic/40381-auto-choose-upload-file/#findComment-195403 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.