cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Files from local Machine

Former Member
0 Kudos

Dear Experts

I need to develop a webdynpro application that would upload all the file in a folder of webdynpro application into KM,

My Ploblem is to locate the file in local machine, when ever i access the file using the code

File folder = new File(c:\MyFolder); the code is accessing path in server but I need to access the path in local machine

Please help me in this issue.

Regards

Noel Maria Deepak

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

As you said you want to upload a file in to KM folder. What i think is your KM folder has a specified location in the server. so just know that location in the server and upload the file there. you can go through the following link to create a folder in the server and upload the file to the mentioned server folder.

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/607e9392-8167-2b10-b9a8-e0aa297e88c6?overridelayout=true]

Regards

Raghu

Former Member
0 Kudos

Hi,

> File folder = new File(c:\MyFolder); the code is accessing path in server

It is doing exactly what it is designed to do. You cannot access local files on the client from a web app running in a browser. You will have to upload the files to the server first and then access it via the server side code.

In Web Dynpro you can use the FileUpload UI Element to upload file(s). There are plenty of tutorials on that and [this|https://wiki.sdn.sap.com/wiki/display/WDJava/Re-creatingtheFileObjectfromWebDynProFileUploadUIcontrol] link is helpful to understand how to access the file after the upload.

Regards,

Satyajit