Take the community feedback survey now.
Take the community feedback survey now.
Hi, Flinn
If you make your way to the App_Data/blobs (default location of media storage on disk in Optimizely CMS) from your solution - do you actually see the physical image?
It could be a missmatch with your localhost environment lacking the actual blob provider path or physcially the images.
Hi Eric,
Yes,
Still no luck.
Thanks for looking.
Since you're image is referring to a png extension, could you confirm you have enabled mediadescriptors for your valid extension:
[MediaDescriptor(ExtensionString = "jpg,png,gif")].
Should be addressed for MediaData.cs or ImageFile.cs or whatever your solution refers to
Hi Flinn,
There are few points you need to check.
1) For uploading the image/media, you should have one class for image/media and that class should inherite from MediaData or ImageDatapublic class DocumentFile : MediaData
{
}
2) For uploading specific image like .png, Media types must be decorated with an extra attribute called MediaDescriptor.
[MediaDescriptor (ExtensionString = "png")]
publicclass DocumentFile : MediaData
Point to remember- Be careful with the extensions that the media types support. If a media item is uploaded when the class has
one set of extensions and the extension is later removed, the previously uploaded media will be “broken” in
the UI.
3) Ensure the media file (image) is published — not just saved as a draft.
4) Make sure you are rendering image using-
@Url.ContentUrl(Model.Image)
5) Url of image is autogenerate, if you are uploading image and doing view in browser. So make sure image would be proper. Or try with other image and check still having the same issue.
Thanks,
Hi,
When I try to download(click on triple dot and download) or access the image url directly in the browser its giving 404 response.
Not sure what is wrong in the code.
Also we are getting on broken file on right click and download.
Anyone experienced this kind of issue?
Thanks,