othman
othman

Reputation: 4556

GWT FileUpload get File Full Path

our Boss wants us to build a client only GWT App. so no server side coding will be involved in our GWT app.

Now we use a FileUpload widget to select a file from user file-system. most Browsers -for security reasons- don't allow FileUpload to return the full path of selected file. a real problem for us!

Is there a way, client-side, to fetch the filepath from a FileUpload widget?

any clever workaround or any other GWT widget that enables user file selection and returns selected file full path in file-system?

thanks.

Upvotes: 0

Views: 4332

Answers (1)

Gipsy King
Gipsy King

Reputation: 1577

You cannot get the full path of a selected file of an input element. The path will be absent or changed to avoid security risks in almost every browser browser.

You can get the file's name, and even its content, with the HTML5 FileAPI.

Upvotes: 1

Related Questions