Replies: 1 comment 2 replies
-
Can you show your code? How are you accessing the media file? What code is failing? what do you expect to happen. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm having trouble accessing Azure media files in MVC application without CMS (created with this tutorial https://docs.orchardcore.net/en/latest/docs/guides/create-modular-application-mvc/) and was wondering, if it is even possible.
When I create CMS website (with this tutorial https://docs.orchardcore.net/en/latest/docs/guides/create-cms-application/) and add Azure media feature and proper appsettings configuration, then I see Azure files in CMS media library on URL /admin/media and can access them directly on URL /media/filename.
For MVC application, I added needed references and appsettings, but cannot access same file on URL /media/filename (it returns 404).



.csproj references:
Appsettings configuration:
Program.cs:
In Program.cs I had to add 3 extra extensions methods so URL /media/filename wouldn't throw exceptions about missing services, so I think that Media feature works, but it still can't find requested file.
Beta Was this translation helpful? Give feedback.
All reactions