NetTalk Central

Author Topic: How to find unparsed file and path?  (Read 3664 times)

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
How to find unparsed file and path?
« 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

Mike McLoughlin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to find unparsed file and path?
« Reply #1 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to find unparsed file and path?
« Reply #2 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

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
Re: How to find unparsed file and path?
« Reply #3 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
Mike McLoughlin