Media file modal defaulting to local files

Karlo Matan asked on September 24, 2025 15:17

We're currently in the process of migrating an existing app (Xperience 13) over to our development environment and decided to leverage Azure storage. We've followed all of the documents regarding this subject, added all the necessary configs and registered the custom module.

Creating folders and uploading to it works fine, the files are reflected in Azure storage as they should be.

But, we have run into an issue in the page-builder. Namely, when I go to the content tab of a page and update an image, the select media modal window opens, pings the backend for the folders and files and displays whatever we uploaded in the storage just fine.

On the other hand, when I try and update a hero banner let's say via the page-builder, the opened media file modal does not fetch data from the storage, but defaults to this -

Message: Could not find a part of the path 'C:\home\site\wwwroot{{name of project}}\media\helloworld'.

As if it does not recognize that it should be trying to fetch files from the storage but tries searching them in the files of the hosted Azure web app itself.

Any help is appreciated, thank you!

Correct Answer

Karlo Matan answered on September 26, 2025 11:15

SOLVED!

The custom storage module was in a separate class library and was referenced only in my WebApp.sln

What I was not aware of though, the class library needed to be referenced in the MVC app as well for it to utilize Azure Storage.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on September 25, 2025 05:16

What widget are you using? What is the form component? Is the storage initialization module registered in the front end app too? Do you have the storage configured in the front end app?

Side note - if both apps will be using shared storage, do not forget to turn off the web farm sync for the files you are storing in the shared storage.

0 votesVote for this answer Mark as a Correct answer

Karlo Matan answered on September 25, 2025 10:56 (last edited on September 25, 2025 13:21)

Hi Juraj thanks for the quick reply.

It's a hero banner widget and the URL selector form component. The custom module is registered in the Webapp solution following the documentation, but I wasn't aware we had to register the module in the frontend app too. Required configs are present in both apps and azure variables.

I have now disabled the media files sync checkbox in webfarm settings and will update here if the issue persists.

Edit: Eg. I uploaded a new image to a folder in media libraries and I can see the image is present in the correct azure storage container. It also appears in the media libraries view in the Administration app. The getmedia endpoint works when going through the backend domain eg. app-site-backend-dev-01.azurewebsites.net/getmedia/295b2391-497b-4747-987d-765e77fc03c6/image.png

But the same endpoint just pointing to the frontend, throws a 404 error app-site-frontend-dev-01.azurewebsites.net/getmedia/295b2391-497b-4747-987d-765e77fc03c6/image.png

Some additional info, we haven't actually deleted the media files from the Web App itself, could that cause some issues? Also, after creating a new folder and adding an image to it, we verified it works and shows in the media libraries page in the CMS, but when trying to load it via the page-builder it throws an error saying it can't find it.

The getfolderstructure request fails, with an error in event log saying it can't find a part of the path like I mentioned in my initial question.

Hopefully this gives a clearer image, if you need any more info please let me know.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.