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



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?
.



Relevant Pages

  • Re: Checking if an image
    ... Basically what you want is a GDIP load without validation. ... It checks the actual content of a data buffer or a url to> determine what the mime type of the data is. ... >> .exe) file to an image extension, upload it, and then cause havoc latter>> on. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Threading in Web App
    ... > I have a web app that performs and upload to a database. ... > then the validation in a serial fashion. ... John ... >> request whose execution caused the page to be created. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Threading in Web App
    ... Part of our process is data validation, so we have no control over what data ... Regardless, the business requirement ... All the thread does is issue an update command when the upload is complete. ... No tie to the request or the user/browser in any ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Threading in Web App
    ... I have a web app that performs and upload to a database. ... DB's typically present since I do not have proper permissions; So an SQL ... then the validation in a serial fashion. ... > request whose execution caused the page to be created. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help with image display
    ... >I was able to upload the file to the "users" directory using Dreamweaver. ... >> I took the file and copied it to the root level. ... >>> When it is in the staging area, ... if I right click on the little square on my viewing page that is ...
    (comp.lang.php)