• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Get file path in mozilla ff

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using an input type = file in my application and the issue is with the file path.
The path is visible in i.e, but mozilla ff just renders the file name, How do i get the complete
file path in mozilla. HELP !!
 
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IE is broken in that it reveals the path. No other browser has this security flaw. Why do you need the path in the first place? You will not be able to get it any other browser but IE.
 
Sheriff
Posts: 27235
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And you won't be able to do anything with the path information anyway. Except maybe you could store it somewhere, but what would be the point of that?
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just clarifying what these guys have already said.

The file path is irrelevant.
If you are expecting to read the file via new File(pathToFile), think again. That file is on the client's machine. So it will initally work on your computer (if you are developing with your computer being both client and server) but once you deploy it you will get FileNotFoundExceptions.

The file input component sends the file with the request. You have to read the file from the request.
Check out a file upload library like the one found at apache commons.
 
reply
    Bookmark Topic Watch Topic
  • New Topic