Re: [PHP] $_FILES path on client's machine?

2007-02-20 Thread Richard Lynch
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



Re: [PHP] $_FILES path on client's machine?

2007-02-18 Thread Sancar Saran
Hi,
No solution from php...

If you find you way to read form file tag path via js you ma send this value 
to server and may store sql then send back.

Aslo I'm not sure to sending back those stored info to client solve the 
problem. 

If you really want to do this.

You have to write your own file browser uploader form via Flash...

regards 

On Sunday 18 February 2007 04:19, Skip Evans wrote:
 Hey all,

 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?

 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.

 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?

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

 Thanks!
 --
 Skip Evans
 Big Sky Penguin, LLC
 61 W Broadway
 Butte, Montana 59701
 406-782-2240

 =-=-=-=-=-=-=-=-=-=-=

 Check out PHPenguin, a lightweight and versatile
 PHP/MySQL development framework.

 http://phpenguin.bigskypenguin.com

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



Re: [PHP] $_FILES path on client's machine?

2007-02-18 Thread Chris

Skip Evans wrote:

Hey all,

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?


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.


I'd like to restore the full value so the user does not have to browse 
the file again.


Nope. Huge security hole ;)

I could prefill the form with something like /etc/passwd if you're on 
a *nix desktop, hide the file input box through css and grab all your 
details without you knowing it.


--
Postgresql  php tutorials
http://www.designmagick.com/

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