cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload the tif file and Display into Iframe

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

In my application i don't have HTML Pages. Only web dynpro Views.

Thanks,

Suni