Coder Social home page Coder Social logo

fboucher / azunzipeverything Goto Github PK

View Code? Open in Web Editor NEW
29.0 6.0 56.0 1.25 MB

A simple Azure Function to Unzip files from a blob storage to another one

License: MIT License

C# 91.70% Dockerfile 8.30%
azure blob-storage arm unzip-files hacktoberfest serverless azure-functions logic-app hacktoberfest2020

azunzipeverything's Introduction

Build Status Serverless Library Deploy to Azure GLO Board

All Contributors

AzUnzipEverything

A simple Azure Function to Unzip files from a blob storage container to another one

The following features are supported in this current version:

  1. Supported Archive Types: .zip, .rar

    Archive support is currently implemented using the sharpcompress library

  2. Password protetected zip files

    The current solution provisions an Azure KeyVault instance for storing the zip archive(s) password used during the unzipping process. If password protected zip files are uploaded to the blob storage container, this would be the password used when attempting to un-zip the files into the destination storage container.*

How to deploy

To deploy all the resources in your Azure subscription, just click on the Deploy to Azure button

Deploy to Azure Deploy to Azure Gov

Fill-up the form and voila! It will be automatically deployed in your Azure subscription. If you don't own an Azure subscription already, you can create your free account today. It comes with 200$ credit, so you can experience almost everything without spending a dime. Create your free Azure account today

Learn more on how to deploy you Azure Function automatically or using the Azure Resource Manager (ARM) template

CreationForm

How to use it.

You can upload files to an Azure Blob storage using many different tools and code, but for this quick introduction let's use the Azure Portal.

Once deployed, open the Azure portal portal.azure.com

  1. navigate to the resource Group you just deployed (ex: demoAzUnzipEverything).

    resourceGroup

  2. Select the Storage Account whose name starts with "dropzone".

  3. Click on Blobs, in the middle of the screen.

  4. Click on the input-files container.

  5. Click on the Upload button, and you can now upload a zip file.

    uploadFile

  6. After a few second the files you uploaded will be Unzipped into the blob storage container output-files.

Run Locally & DevContainer

You can run the Azure Function locally or in a dev Container (files provided in folder .devcontainer). You will need:

  • a local.settings.json file at the root. You can renamed and update local.settings.example.json or use it as template.
  • a storage account in Azure or using the emulator
  • a KeyVault with a secret ZipPassword.

Continuous Integration (CI)

As you can see by the status badge Build Status at the top of the page this project is automatically build at every push.

Have a look, the Azure DevOps project is public!

Create a Continuous Integration, Continuous Deployment (CI-CD) for your Azure Function

In this video, I show you how to write an Azure Resource Manager (#ARM) template to deploy automatically your serverless Azure Function to Azure. It can be then used with a "Deploy to Azure" button from GitHub or any website, or in an Azure Pipeline to complete a Continuous Integration, Continuous Deployment (CI-CD) solution.

FunctionCICD

There is also a written version if you prefer reading: http://www.frankysnotes.com/2019/07/four-ways-to-deploy-your-azure-function.html

More details

I have a blog post about this Azure Function.

I also have a video where I build and test the function.

Auto-UnzipFunction_YT

I also have an extended version where I introduce more the Visual Studio Extension to work with Azure Function. And explain more details about the Azure Function V2.

AzureFunctionWithVSCode_YT

Contributing โœจ

Want to contribute? Check out our Code of Conduct and Contributing docs. This project follows the all-contributors specification. Contributions of any kind welcome!

Thanks goes to these wonderful people (emoji key):


Frank Boucher

๐Ÿ’ป ๐Ÿ“น ๐Ÿ“–

Michael Reyeros

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

azunzipeverything's People

Contributors

allcontributors[bot] avatar azureadvocatebit avatar fboucher avatar mreyeros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

azunzipeverything's Issues

Unzipped file

starting from minute 10:56 of your video, you'll see a screen in which the size of the unzipped files is 0 bytes for all.

Very, very slow...

Thanks for putting together such a great project - however I am having issues with unzipping anything more than 100MB. It just takes a very long time...nearly an hour.

Are you experiencing the same?

Possible to add a unique folder name for the output container so files are not overwritten?

Is there a way to have the output of the zip file put into a unique foldername inside the output-files container? My zip files names have the date/time stamp in it and was wondering if I could have the output stream create a new folder with that file name (i.e. filename is LBI_20220719103131.zip and would like the output to put the files in the "output-files/LBI_20220719103131 folder"? Otherwise if I have multiple zip files put into the input-files folder at the same time, it overwrites what is in the output-files container?

Stops Monitoring Folder

Hello!

I've been using this for a little while to assist transferring data across a couple of logic apps - it's great, big thanks.

I'm having an issue where the function appears to stop monitoring the storage - after a period of time (12-24hrs?), zip files uploaded to the storage account are no longer unzipped. A manual restart of the function app fixes it, and the files that were uploaded while it was non-functional are then unzipped.

I was hoping to work around by simply calling a restart of the function app via logic app integration, but that's a no go - it says all the right things ,but only a manual 'restart' through azure webUI works.

Any chance I'm not alone with this behaviour?

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.