cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload in Web Dynpro

Former Member
0 Kudos

Hi all,

I need to upload file from user local computer into Web Dynpro context, but standard FileUpload component doesn't look very "attractive" to me. There are 3 main reasons:

1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....

2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)

3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )

How can I eliminate these minuses, or is here alternative solution for file uploading file in WD? My customer environment is NW 2004.

Regards,

Juraj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please go through this link and see how to internationalize the File Upload UI component.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a...

I am not sure about an alternative way to get the client file in to IWDResource form. Will try to get you more docs on mentioned subject.

Regards

Vinod V

Answers (3)

Answers (3)

nikhil_bose
Active Contributor
0 Kudos

Dynpro UI elements has limitations. But we can use them the way we want within these limitations.

1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....

If there is a fixed place to hold the documents, we can prefix the path upto the filename.

2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)

we can get the MIME type from the resource. And further processing can be restricted.

3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )

I Agree that we can't change "Browse", but still we can have the orientation, if your browser is Arabic, it got aligned at right hand side.

thread:

nikhil

Edited by: Nikhil ßos on Jul 3, 2008 1:07 PM

Former Member
0 Kudos

Hi Nikhil,

thanks, for your answer, but ...

"If there is a fixed place to hold the documents, we can prefix the path upto the filename."

Problem is, that application freeze in client - browser - you have no possibility to prefix it, because there is no roundtrip to server between choosing file through javascript in browser and calling upload functionality as action on server.

"we can get the MIME type from the resource. And further processing can be restricted."

But it will be nice to restrict it on client side, too - for example there's no need to import upload file with 'bad' MIME; parse it on server and then just throw away it.

nikhil_bose
Active Contributor
0 Kudos

hi juraj,

yeah. you are right. We can't prefix the filename. Thanks for reminding me as there is no direct access from browser to client except through File UI elements.

nikhil

snehal_kendre
Active Contributor
0 Kudos

Hi juraj,

you have to use it as it is. there is no option.

and you need to take care of user not entering file path manually..

Former Member
0 Kudos

Go through dis link, all details u will find for uploading files.

/docs/DOC-8061#41 [original link is broken]

Former Member
0 Kudos

Hi Royan,

thanks for Your answer, but I've already read and tried that tutorial - I'm not satisfied with that solution, cause there are 3 main minuses for me (see my first post)

Regards,

Juraj

Former Member
0 Kudos

Hi Juraj,

Did you find any solution to validate manually enter file path in the file upload functionality.Please let me know

Regads,

Madan

Former Member
0 Kudos

Hi madan,

no, I didn't find solution for this.

One way is to create own upload component using servlets - for example you can use [something like this|http://commons.apache.org/fileupload] - and than make cooperation with your Web Dynpro application. But i didn't go through this alternative, finally my customer was satisfied with solution in web dynpro .