#28802 [Com]: name of file upload cutted in php4.3.7
| From: | imprestavel at gameguru dot com dot br | Date: | Fri, 18 Jun 2004 18:02:55 +0000 |
| Subject: | #28802 [Com]: name of file upload cutted in php4.3.7 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61078@lists.php.net to get a copy of this message | ||
ID: 28802
Comment by: imprestavel at gameguru dot com dot br
Reported By: mstaiger at informatik dot uni-siegen dot de
Status: Open
Bug Type: HTTP related
Operating System: win 2k server
PHP Version: 4.3.7
New Comment:
You may try:
<input type="text" size=50 name="userURL">
Using input-file for URL was not desired because input-file is for
uploading local files.
From the manual:
http://www.php.net/manual/en/features.file-upload.php
"$_FILES['userfile']['name']
The *original name* of the *file on the client machine*."
original name != url/path
And if the client/browser decides to upload a "fake" empty file,
because it doesn't exist locally, there is nothing php can do about it,
but you could check that and do something
Previous Comments:
------------------------------------------------------------------------
[2004-06-16 11:52:41] mstaiger at informatik dot uni-siegen dot de
Description:
------------
The typical file-upload HTML-command:
<input type="file" size=50 name="userfile">
creates an input field to pick a file from the local machine.
We used to "abuse" this field also to insert URLs instead of physical
filenames which worked fine so far. When entered
"http://www.somedomain.com" the php variable
$_FILES['userfile']['name'] contained the entire URL :
"http://www.somedomain.com"
Now, the new version seems to cut everything before the last slash and
$_FILES['userfile']['name'] contains only "www.somedomain.com",
without
"http://" .
We could not find any documentation for this behaviour and doubt that
this behaviour was desired?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28802&edit=1