cancel
Showing results for 
Search instead for 
Did you mean: 

uploading file into DC

Former Member
0 Kudos

Hi Experts,

I am facing problem while trying to upload a file using FileUpload UI Element to specified path in the deployed DC component.

I tried this for a local wd project using WDDeployableObjectPart , and it's working fine. But coming to DC , it's rainsing exception.

this is the statement which creates an empty file in the resource path.

File ff=new File(WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(),"test.txt"));

if(ff.exists()==false)

ff.createNewFile();

Thanks in advance

Lakshmi Narayana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lakshmi,

What is the error that u are getting.

Former Member
0 Kudos

Hello Anand,

Now no exception is coming.. I am able to write to the public folder of deployed DC now.

We have to use getPublicResourcePath instead of getResourcePath for DC.

Here is the statement.

File ff=new File(WDURLGenerator.getPublicResourcePath(wdComponentAPI.getDeployableObjectPart(),"
one.txt"));

if(ff.exists()==false)

ff.createNewFile();

Now I am trying to get the url of this file, but not able to get.

Can anybody suggest me to do so.

Thanks in advance

LakshmiNarayana

Answers (0)