Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path
using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path [message #804946] Thu, 23 February 2012 07:09 Go to next message
ocean xue is currently offline ocean xue
Messages: 107
Registered: November 2011
Senior Member
using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path.
now I can only use FileUpload.getFileName () Get the file name.
Re: using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path [message #804995 is a reply to message #804946] Thu, 23 February 2012 08:13 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi,
why do you need the complete path of the selected file on the client? I
think that due to security reasons, its not possible to get the full
path on the client when HTML browse button is used.
Best,
Ivan

On 2/23/2012 9:09 AM, ocean wrote:
> using org.eclipse.rwt.widgets.FileUpload, how to get the selected file
> path.
> now I can only use FileUpload.getFileName () Get the file name.

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path [message #805004 is a reply to message #804995] Thu, 23 February 2012 08:25 Go to previous messageGo to next message
ocean xue is currently offline ocean xue
Messages: 107
Registered: November 2011
Senior Member
Get the full path, I want to read this file to the database
Re: using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path [message #805105 is a reply to message #805004] Thu, 23 February 2012 10:39 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
You can't read this file directly from the client without uploading it
to the server first. That's why the full *client* path is useless. Did
you write your custom file upload handler? Probably, the
"org.eclipse.rap.rwt.supplemental.filedialog" or
"org.eclipse.rap.rwt.supplemental.fileupload" bundles from the incubator
is what you are looking for.
HTH,
Ivan

On 2/23/2012 10:25 AM, ocean wrote:
> Get the full path, I want to read this file to the database

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: using org.eclipse.rwt.widgets.FileUpload, how to get the selected file path [message #805327 is a reply to message #805004] Thu, 23 February 2012 16:31 Go to previous message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1291
Registered: July 2009
Senior Member

On 02/23/2012 09:25 AM, ocean wrote:
> Get the full path, I want to read this file to the database

You don't get the full path in all browsers. So we cut off the path to
provide the same results in all browsers. As Ivan said, you should not
rely on the path - it belongs entirely to the user.

Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Presentation Factory
Next Topic:About TitleAreaDialog ButtonBar
Goto Forum:
  


Current Time: Fri Oct 24 11:20:04 GMT 2014

Powered by FUDForum. Page generated in 0.02999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software