Skip to main content


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 xueFriend
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 FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
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 xueFriend
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 FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
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 SternbergFriend
Messages: 1313
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:Accessing SessionSingleton from thread
Next Topic:About TitleAreaDialog ButtonBar
Goto Forum:
  


Current Time: Thu Apr 18 00:14:06 GMT 2024

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

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

Back to the top