Giter VIP home page Giter VIP logo

static-website-blob-browser's Introduction

services platforms author
storage
javascript
seguler

Static Website Sample - File Browser app for Blob Storage

This sample application can be used as a static website on Azure Storage to list the contents of a Blob container (anonymously). The project was bootstrapped with Create React App. The sample assumes your blob container is made public, however it can be modified to use Azure Active Directory authentication. The file browser also allows downloading each file with a single click.

Demo

Try the app here: https://staticwebsitedemo.z20.web.core.windows.net/

Pre-requsites

Deploy the sample - step by step

Follow the following steps to deploy the sample on your Azure Storage account. Once deployed, the sample app will provide you a file browser view of your $web container. If you desire so, you can change the container in the index.js to any other public container.

  • Clone the repository to your PC git clone https://github.com/seguler/static-website-blob-browser
  • Launch VS Code. Log on to the Azure Storage extension.
  • Install create-react-app using a terminal (VSCode) npm install -g create-react-app in 'static-website-blob-browser' folder
  • Open the sample in VSCode using File>Open Folder menu
  • On the terminal, run npm install and then npm run build to build the React app
  • Right click build folder in VSCode, and click Deploy to Static Website
  • Choose your storage account to deploy the static website

Once you have deployed, configure the container as public, and set the CORS settings to allow access from the static website endpoint.

  • Go to Azure Portal, select your storage account
  • Click CORS on the menu. And add a new row
  • Go to Blobs menu
  • Click on the ... next to the desired blob container (in the sample, $web is used)
  • Click on Access Policy and configure Public Access for the Container. This is required for anonymously listing blobs using the SDK.

Blob browser - Static website

More information

static-website-blob-browser's People

Contributors

aleksueir avatar

Watchers

 avatar

static-website-blob-browser's Issues

Support url hostile characters in folder paths

When browsing through the folder tree, if a folder has a character that is special to urls ( # for certain, probably ? & = as well), the navigation url will not escape the character and the browser mis-interprets it. You cannot navigate forward unless you hand-craft the url with the naughty character escaped.

These characters would mostly get introduced via a branch name.

Attempt to enhance the codebase to catch these characters and escape them (like, in a %AB format)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.