Unzip file uploaded to Azure Websites

后端 未结 6 922
你的背包
你的背包 2021-01-02 07:27

I uploaded a zip of my Wordpress site to an Azure website. When I try to FTP in with Winscp it works, but I can\'t use unzip transfer.zip in the command interface.

H

相关标签:
6条回答
  • 2021-01-02 08:08

    So it seams that the recent answers to this question is obsolete because console button is not available anymore in azure portal so there is no way to access unzip this way.

    You have to use kudu site instead in order to access console and run unzip command. Simply navigate to https://your-web-app-name.scm.azurewebsites.net and click CMD

    Or just navigate https://your-web-app-name.scm.azurewebsites.net/DebugConsole

    Then do your unzip -filename

    0 讨论(0)
  • 2021-01-02 08:09

    There is now unzip logic built in to the Kudu interface. Drag to the correct spot in Kudu and the file will upload and unzip automatically.

    0 讨论(0)
  • 2021-01-02 08:10

    unzip by info-zip.org is currently available on AZURE in the console.

    As indicated it produces a red error message: Bad Request, but appears to work correctly nevertheless.

    I contacted the supplier and they said:

    I know approximately nothing about Microsoft Azure, and even less about exactly what you did, but I took a quick look at the UnZip source, and didn't see anything like a "Bad Request" message. My first guess would be that UnZip seems to be working correctly because it is working correctly, and that the "Bad Request" message comes from somewhere else.

    0 讨论(0)
  • 2021-01-02 08:11

    One way is to upload the command line version of 7-Zip, it's a standalone .EXE file.

    Next, from the Azure Preview Portal Azure portal (2014), navigate to your Website, click on the console tile and type the unzip command:

    7za x thezipfile.zip
    

    An alternative to the portal is to use the console from Kudu. Insert "SCM" between your Website name and azurewebsites.net like this to launch Kudu:

    yoursitename.scm.azurewebsites.net
    

    One advantage in using Kudu is that you can upload files directly in the browser just by drag&dropping them.

    Pretty cool.

    0 讨论(0)
  • 2021-01-02 08:12

    Since all answers above explain how to unzip files in a Web App running on Windows, let me add how to unzip in a Linux environment.

    Head to https://mysite.scm.azurewebsites.net and select "Bash" ("SSH" is much better/faster to use, but doesn't support unzip or 7za to date):

    Now simply type unzip myfile.zip and the files inflates. The process is also printed to the console:

    Hope this helps.

    0 讨论(0)
  • 2021-01-02 08:22

    This is possible using the Azure portal's console.

    1. Navigate to portal.azure.com.
    2. Locate your website (Browse->Websites, click on name of the website you uploaded your ZIP file too)
    3. Scroll down until you see the "Console" button. By default, this is on the righthand side about three-quarters of the way to the bottom of the icon list (or "blade" in Azure portal parlance). The icon looks like this:

    Azure portal console icon

    1. Navigate to the directory you uploaded your ZIP to using the cd command, just as you would on a typical console or shell window.

    2. Execute unzip archive.zip where archive.zip is the name of your ZIP file.

    Note that as of today, the unzip command will not output any progress reports; it runs silently. So, if you have a large archive that takes some time unzip, it may appear as if the command has hung, but in fact it is working and you just need to wait.
    Update Sep 2018: The unzip command outputs its progress to the console, e.g.:

    Archive:  archive.zip
       creating: archive/
      inflating: archive/203439A9-33EE-480B-9151-80E72F7F2148_PPM01.xml  
       creating: archive/bin/
      inflating: archive/bin/some.dll
    
    0 讨论(0)
提交回复
热议问题