Hi all
how can i get full file url from file input form ?
i mean now if i use this code
var a = document.getElementById("ali").files.item(0).fileName();
it'll give me the name only i need the full path like " C:\new\ ... ect "
how can i get that ?
is the .filePath(); ? or something like it ?
cuz i need it to upload file from php script ..
thanks,
how can i get full local file path ?
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: how can i get full local file path ?
As far as I know, atleast with the newest browsers, they will not give you this information in the scope of javascript.
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: how can i get full local file path ?
And I don't see why you need this to upload a file using PHP.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: how can i get full local file path ?
John Cartwright wrote:As far as I know, atleast with the newest browsers, they will not give you this information in the scope of javascript.
i need it cuz when i set the request header to multipart/form-data using post method $_FILES would give me error 3 (partial upload)
tmp_name = empty
type = empty ..
name = only filename without path
Re: how can i get full local file path ?
it's bucause i need to upload file without refresh my page and the link appear without redirect ..AbraCadaver wrote:And I don't see why you need this to upload a file using PHP.
i need it to be AJAX 100%
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: how can i get full local file path ?
Posting an upload form through ajax and posting the form through conventional means are nearly identical.
It would be helpful to post your existing code to determine where you wen't wrong with that.
It would be helpful to post your existing code to determine where you wen't wrong with that.
Re: how can i get full local file path ?
i'll try what u'd said ..John Cartwright wrote:Posting an upload form through ajax and posting the form through conventional means are nearly identical.
It would be helpful to post your existing code to determine where you wen't wrong with that.
thank you for ur help