The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> file upload from a form, Trying to find full path name for an uploading file
jalguire
post Jul 14 2012, 08:17 PM
Post #1





Group: Members
Posts: 3
Joined: 14-July 12
Member No.: 17,440



When using a form to upload a file via PHP, it appears that the browser user agent does some internal processing and only provides the actual file name, without the full path name, to the PHP global $_FILE. I have looked at most all the PHP server-side globals and have not as yet found any mention of the path to the uploading file.

It seems to me that this information must be available somewhere to enable the browser, via the form, to upload the file to the server.

If anyone knows where this path information is hiding and how it might be accessed, I sure would appreciate knowing to find it.

Thanks, Jim

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 15 2012, 07:05 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



It should be kept hidden by the UA for security reasons.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jalguire
post Jul 15 2012, 12:56 PM
Post #3





Group: Members
Posts: 3
Joined: 14-July 12
Member No.: 17,440



QUOTE(Christian J @ Jul 15 2012, 04:05 AM) *

It should be kept hidden by the UA for security reasons.


Christian, thanks for the reply. Apparently not all UAs are concerned with security. Safari and Chrome both conceal the path to the file, but Firefox and Opera display it in a text box for all to see. This on the Mac.

Jim
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 15 2012, 02:08 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



True, but it isn't sent along with the form submission. Javascript shouldn't be able to access the file text field's content either.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jalguire
post Jul 15 2012, 07:54 PM
Post #5





Group: Members
Posts: 3
Joined: 14-July 12
Member No.: 17,440



QUOTE(Christian J @ Jul 15 2012, 11:08 AM) *

True, but it isn't sent along with the form submission. Javascript shouldn't be able to access the file text field's content either.


Thanks again. That is what I found too, but nice to have a confirmation.
Jim
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 07:06 AM