Modx Custom MediaSource type - OneDrive

Hi All,

Do you know how I can create a new mediasource type to use OneDrive file storage as MediaSource, like it is possible with Amazon S3?

Thanks in advance!

1 Like

Here is a page on this, it doesn’t seem too hard

https://docs.modx.com/revolution/2.x/administering-your-site/media-sources/securing-a-media-source/creating-a-media-source-for-clients-tutorial

Actually this page might be better

https://docs.modx.com/revolution/2.x/administering-your-site/media-sources/adding-a-media-source

1 Like

It’s a little more complicated than that unfortunately. You’ll need to create a custom media source driver. I’ve never done it myself but you may be able to pick this apart and work something out.

https://modx.com/extras/package/googlecloudstorage

2 Likes

Thank you for your help.
I am trying to find a way to use fred with file picker and get it directly from shared folder of OneDrive to take advantage of embedded office online file viewer/editor. This would allow to not reinvent the wheel.

I will give this a try.
Many thanks for your tips!

1 Like

I remember talking about this in the forums within the last year, the old forums but I can’t find anything good now.

maybe this will help, a bit.

https://forums.modx.com/thread/103213/creating-a-media-source-driver

I seem to remember that the googlecloudstorage extra hard codes the values for the media source, so it can be copied and change the values to the real media source. But I can’t be sure this is correct, it might have been a different extra…

1 Like

Well, I am closing this topic now as creating a driver for this seems to beyond the needs right now. Public share having office documents directly opened in Office Online helped to do what was expected.
Then share link for individual files will work for the fred links.
I am closing this topic.

Many thanks for your suggestions

1 Like