Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Is there a way to get to the filename and extension with the Damp Editor Property Editor Value Converter ?
Now I'm using this code:
var document = Model.Content.GetPropertyValue<DAMP.PropertyEditorValueConverter.Model>("mediaArticleDocument");
var filename = document.First.Name;
but this give me the file name without the extension.
"media_article_filename"
What I would like is to get the filename with the extension
eg. "media_article_filename.pdf"
Thanks for your help,
Anthony
Hi
this will give you extension
document.First.Media.umbracoExtension
then you can concatenate it with yourfile name.
string.format("{0}.{1}",document.First.Name,document.First.Media.umbracoExtension)
Hi Ali, thanks a lot,
I was hoping there was some kind of convenient property but this works as a charm : )
greetings,
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
accessing file name + extension with Damp Property Editor Value Converter
Hi,
Is there a way to get to the filename and extension with the Damp Editor Property Editor Value Converter ?
Now I'm using this code:
var document = Model.Content.GetPropertyValue<DAMP.PropertyEditorValueConverter.Model>("mediaArticleDocument");
var filename = document.First.Name;
but this give me the file name without the extension.
"media_article_filename"
What I would like is to get the filename with the extension
eg. "media_article_filename.pdf"
Thanks for your help,
Anthony
Hi
this will give you extension
then you can concatenate it with yourfile name.
Hi Ali, thanks a lot,
I was hoping there was some kind of convenient property but this works as a charm : )
greetings,
Anthony
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.