Upload html file to Azure Storage static web hosting
function uploadSite(page){ | |
context.log("Upload site "); | |
var blobService = storage.createBlobService(); | |
// create $web container | |
blobService.createContainerIfNotExists('$web', function(){ | |
// upload index.html to $web container | |
const options = { contentSettings: { contentType: 'text/html' } } | |
blobService.createBlockBlobFromText("$web", "index.html", page, options, function (error) { | |
context.log("uploaded"); | |
context.done(); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment