Skip to Content
avatar image
Former Member

How to upload the tif file and Display into Iframe

Hi all,

My requirement is to upload 'n' number of tif files and display the file name in dropdown.

If i select the file name, it should display the file in Iframe.

My problem is i am not able to upload the tif file.

try{
      byte []by=new byte[wdContext.currentContextElement().getPhotoResource().read(true).available()];
      wdContext.currentContextElement().getPhotoResource().read(true).read(by); 
      String ext=wdContext.currentContextElement().getPhotoResource().getResourceType().getFileExtension();
      WDWebResourceType res=wdContext.currentContextElement().getPhotoResource().getResourceType();
      IWDResource resource=null;
      resource=WDResourceFactory.createResource(by,"sample",WDWebResourceType.getWebResourceTypeForFileExtension(ext));
       wdContext.currentContextElement().setPhoto(resource.toString());
		}
		catch(Exception e){
		}

In the above code Photo is Iframe Context variable.

If i upload tif file means it directly giving Save and Open options is giving.

Please how to slove this probelm...........................

Thanks,

Suni

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 16, 2007 at 12:03 PM

    Hi Satya,

    In HTML a TIF file can be displayed as"

    <html>
    <body>
    <object height="100%" width="100%"
    type="image/tiff" data="PO.tif">
    </object>
    </body>
    </html>

    Hope it helps.

    Regards,

    Alka

    Add comment
    10|10000 characters needed characters exceeded