Re: $_FILES path on client's machine?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, February 17, 2007 8:19 pm, Skip Evans wrote:
> I get the feeling from not finding an argument for
> the path on the client's machine for the complete
> path of a file in $_FILES that it might not be
> available for security reasons?

Yes.

It's none of your business where I store the file on my hard drive. :-)

Sorry.

> The reason  I am interested in this is to restore
> the value of a input type='file' field in a form if
> the user has to return to the form for validation
> reasons.

One way this can be handled is the way Squirrel mail does it:

Accept the upload on your server in some kind of staging area.

Give the user the option of including that file, already uploaded,
and/or uploading another.

This has an added bonus of not making them upload a dang file just
because they mis-typed their email or whatever else failed validation.

You then just have to process the files from the staging area to the
final resting place after everything passes validation.

> I'd like to restore the full value so the user does
> not have to browse the file again.
>
> Is there a way to do this?

Not the way you are thinking, no.

> I thought perhaps there might be a
> $_FILES['image']['path'] value or something.

One can see where you would think that, and everybody thinks this at
first, until they think about it more, and realize just how much it
would reveal about the users' computer and the Privacy Issues it opens
up, and then they're like, "Ohmigod, how could I have thought that was
a Good Idea?!"

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux