Cannot upload images using browse files features in EPIServer

Vote:
 

I have created a EPIServer CMS site using visual studio. I am able to access the site using edit mode. I want to add some image on that site. But when I am trying to upload a image using the upload option it is showing failed message.Why it is happening do you have any idea. But when I have uploaded the images from the demp 'Aloy Site' given by EPIServer team it is uploaded successfully. Please tell the probable cause of this.

Thanks and regards

Utpal Maity

#80234
Jan 17, 2014 11:35
Vote:
 

You need to have a class (at least one, you can have several) implementing IContentMedia (or inherit some class that implements it like e.g. MediaData, ImageData etc) in your project. It has to have ContentType attribute as well.

You can then also use MediaDescriptor attribute to control which type that should be created given file extension.

#80235
Edited, Jan 17, 2014 11:48
Vote:
 

Hi Johan,

Can you give me an example or link from where I can found an example.

 

 

#80302
Jan 20, 2014 14:58
Vote:
 

Simplest possible would be to add a class like:

[ContentType]
public class GenericMedia : MediaData
{}

but you probably want more specific types for images, videos etc. If you look in the alloy sample project you find media types under Models/Media

#80304
Jan 20, 2014 15:06
Vote:
 

I have the same problem, think it might have something to do with IIS Express Worker Process not having write access to the Virtual Path (AppData).. Don't really know how to fix it though, does anyone else?

#80313
Jan 20, 2014 15:45
* 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.