Re: Upload file name not file
| From: | MikeP | Date: | Fri, 01 May 2009 13:34:07 +0000 |
| Subject: | Re: Upload file name not file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-292180@lists.php.net to get a copy of this message | ||
I'm not trying to get the path, just the filename and size, I know how to
get these, but that would include the file using $_Files, but I dont want to
upload anything just use the filename and size.(without the path) to insert
into a DB.
"Simon" <turner25@gmail.com> wrote in message
news:5f14cf5e0905010629s2253cc3bk2a83dbf8b754c4b9@mail.gmail.com...
>> Id like to use the popup file system box(<input name="userfile"
>> type="file"
>> />) to choose a file name , but I only want to upload the filename , not
>> the
>> file. Can I do that?
>
> You're not supposed to have any access to the remote visitor's
> computer, and the path to the file being uploaded could contain
> sensitive information (ie. like username of windows user). There are
> ways to get the information, even to read information on disk without
> the use of a file upload form. But they are/will be considered like
> security threats and are/will be closed down.
>
> IMO, whatever way you find to get this information is meant 1) not to
> be portable accross different browsers and 2) to stop working
> eventually. (Of course unless you ask the user to explicitly type the
> path in a text input)
>
> What do you need this for?