November Happy Hour will be moved to Thursday December 5th.

Image Vault API

Vote:
 

Hi,

I have the following control in front end:

"<img id="imgMedia" runat="server" />"

I assign the file id at code behind as following:

var ub = new IVUrlBuilder();
ub.Id = fileData.Id;
imgMedia.Src = ub.ToString();


When rendered, the image is rendered as following:

"img id="ctl00_PageContent_trwMediaDtl_imgMedia" src="/ImageVault/Images/id_3/scope_0/ImageVaultHandler.aspx" "

This sometimes doesn't display the corresponding image (when the file is normally a pdf or word file) and displays only a cross sign (as displayed when an image is not found). If its a image its getting displayed.

This image however is displayed on the site's image vault link (navigated through EPiServer edit mode), where it is displayed as a word icon (if its a word file) and is rendered as the following:

"img id="imgPreview" style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px;" src="/ImageVault/Images/id_3/scope_66/ImageVaultHandler.aspx" complete="complete" "

When I access the file using the link - "~/ImageVault/Images/id_3/scope_66/ImageVaultHandler.aspx", I get the image. But I don't get the image when accessed using the link - "~/ImageVault/Images/id_3/scope_0/ImageVaultHandler.aspx".

I even added the line - ub.ConversionFormatType = "jpg", however this also didn't help.

How am I supposed to approach in such a scenario, so that I get the image displayed.

Thanks.

Rajesh

#58865
May 09, 2012 15:52
Vote:
 

You could just try and replace scope_0 with scope_66 but I would suggest that you ask the question at meridium.se - they should know what to set.

#58910
May 10, 2012 18:36
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.