Skip to Content
avatar image
Former Member

How can I access at runtime all the files stored under current mimes

Hi Guys,

How can I access at runtime all the files stored under current mimes/components/<My Comp>/<myPictures>.

I would like to have access at runtime to all the pictures stored under the above folder.

Is there such available API.

many thanks

Harry

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 20, 2008 at 05:43 AM

    Hi Harry ,

    use this code to access the file at run time

    Note: Put the correct file path

    IWDResource res = WDResourceFactory.createResource(

    new FileInputStream(FilePath"
    "
    wdContext.currentContextElement().getDirectory()

    +wdContext.currentContextElement().getFileName()), wdContext.currentContextElement().getFileName(),

    WDWebResourceType.DOC, true);

    wdComponentAPI.getMessageManager().reportSuccess("=="+FilePath);

    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(

    res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),

    res.getResourceName());

    window.show();

    } catch (FileNotFoundException e) {

    // ..

    }

    Thanks

    Add comment
    10|10000 characters needed characters exceeded