Hi,
I have field which is
Name: ProdImage
Date Type: text
Form Control: Media Selection
If I need to know media file information, how can I do that?
For an example if I want to know what is a size of the file? is that a image file? if image file than what is height and width of the image? etc...
Please let me know if you need more details or I am not explaining properly.
Thanks
Having media file URL you should be able to get its info with following code: MediaFileInfo updateFile = MediaFileInfoProvider.GetMediaFileInfo(SiteContext.CurrentSiteName, "MyNewFolder/MyNewFile.gif", null);
MediaFileInfo updateFile = MediaFileInfoProvider.GetMediaFileInfo(SiteContext.CurrentSiteName, "MyNewFolder/MyNewFile.gif", null);
Hi Roman,
Thank you for your help but I do have "/MyMediaFiles/media/MyMedia/Products/img-210x830.png?ext=.png" as field value. How can I do that?
Please, sign in to be able to submit a new answer.