Reading media files in widget

Topics: Customizing Orchard, Writing modules
Feb 18, 2012 at 9:42 PM

In my current widget I need to read (and display) all files in a certain folder in the media folder, I'm having a lot of trouble getting that arranged.

I read about IStorageFile that seems to be what I'm looking for but I cannot find any documentation about it.

Am I searching in the right direction?

Feb 19, 2012 at 1:32 AM

You should probably take a look at the Media module code.

Feb 19, 2012 at 2:53 PM

Thanks for your quick reply.

I checked the code you refer to, but I still have trouble because I can't find any documentation.

For the things I want to do I probably should use the MediaService?

But how do I use it? It needs a storage provider and Orchard services object.

Maybe I just don't understand the concepts, but some documentation about this would be nice.

Feb 20, 2012 at 12:22 AM

Yes, it seems like you need to get acquainted with dependency injection. There is some documentation about that here:

Documentation, like the rest of Orchard, is made by the members of the community, so if documentation on a specific topic is lacking, it's that nobody contributed it yet.