Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a copy file from blob storage in azure startup task?

Is there any power shell command to download file and place at Application Root in Windows Azure start-up task? I have geo location binary file(30Mb)which is downloaded from http://www.maxmind.com/app/geolitecity. I don't want to include binary file in my project, decided to place in blob storage for faster deployment purpose. I tried to read binary from URL using http://en.googlemaps.subgurim.net/, unfortunately no function to read from URL. So i'm finding the way to download that binary file and place in application root directory.

Thanks in advance!

like image 323
blackpg Avatar asked Feb 24 '23 03:02

blackpg


1 Answers

maybe this can help:

$object = New-Object Net.WebClient
$url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
$local = "$pwd\GeoLiteCity.dat.gz" #path to save download file
$object.DownloadFile($url, $local)

In this case file is zipped, you need to unzip the dat file.

like image 168
CB. Avatar answered Mar 05 '23 18:03

CB.