Skip to Content
author's profile photo Former Member
Former Member

uploading file into DC

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 26, 2009 at 06:13 AM

    Hi Lakshmi,

    What is the error that u are getting.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.