Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to view files in Azure Static Web App?

Is there a way to view the files uploaded to Azure Static Web App using Azure Portal? I need to check few items. I can see the file in my DevOps Repo but want to confirm it is located in the correct folder structure in Azure Static Web App. Please note that this is not Azure Blob Storage.

like image 424
Harini Vedala Avatar asked Aug 30 '25 15:08

Harini Vedala


1 Answers

Even though this is an old question, I still had this problem when someone wanted this functionality for one of our apps. In our instance, we're simply hosting static files in the default $web container of the storage account. One of our developers asked if it was possible to have directorty browsing, like we did when we previously hosted these files with Apache?

I tried many different things but couldn't make anything stick. Maybe it's my abilities, maybe it's by design, but after spending almost a day trying to make it work - I ended up with a simple, but somewhat dirty hack.

During the Azure Devops pipeline I use to build and create the artifact, I install the Linux tool "tree".

Lets simply call the folder that contains our code, "code". I created a script that runs after the code has been built and it's ready for packaging. It contains this simple command: find . -type d -exec tree -H . -o '{}/tree.html' ;

https://example.com/tree.html contains the tree structure of the published app.

It's not pretty, but it serves the purpose of listing the structure and containing files.

like image 69
Myrdrahl Avatar answered Sep 05 '25 18:09

Myrdrahl