NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mike McLoughlin on June 18, 2009, 01:52:03 AM

Title: How to find unparsed file and path?
Post by: Mike McLoughlin on June 18, 2009, 01:52:03 AM
I need to store the path + filename that the user selected in a file upload field when they click on Browse.

But everywhere I look - .handlefile, .renamefile etc the original path has already been parsed out.

regards

Mike

Title: Re: How to find unparsed file and path?
Post by: Bruce on June 18, 2009, 10:48:01 PM
Hi Mike,

It's not parsed off by the browser, it's simply not sent at all by the browser.

You could experiment moving the value of the File-Upload field into a hidden field, but I suspect there's a reason the browser hides the path from you. So that approach may, or may not, be successful.

Cheers
Bruce
Title: Re: How to find unparsed file and path?
Post by: Bruce on June 18, 2009, 10:52:59 PM
update:

Even accessing the Value property of the field via JavaScript returns only the file name, not the path.

sorry.

Cheers
Bruce
Title: Re: How to find unparsed file and path?
Post by: Mike McLoughlin on June 19, 2009, 07:04:17 AM
I wanted the full file+path so I could save the original file size and then check it against the uploaded file size - to see if the user had allowed a full upload to take place.

Is there another way you can think of to get the size of the file selected for upload?

thanks

Mike