Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi, maybe this is not exactly what you want (asset folder), but you should be able to define the following property:
[Display(GroupName = SystemTabNames.Content, Order = 1)]
[Required]
[UIHint(UIHint.MediaFolder)]
public virtual ContentReference MyFolder { get; set; }
This will let you select a folder (only a folder) from the Edit interface, which you then can use for your file upload:
var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
var file = contentRepository.GetDefault<GenericFile>(MyFolder);
...create blob, write and save file etc...
Hello!
I need to set a property on a page to allow the editor to select which asset folder uploaded images should be saved in. Right now, when a user submits an image in an form, I create a blob and just save it under SiteDefenition.Current.GlobalAssetRoot. How do I do this/change the place where I save the uploaded images?