Git Product home page Git Product logo

azure-blob-handler's Introduction

Azure-blob-handler

Concept

간단한 azure blob storage 헬퍼 라이브러리 입니다. azure 에서 제공해주는 SDK 를 사용하기 쉽게 랩핑 된 수준입니다.

blob에 특정 파일을 업로드하고 다운로드하는 기능을 제공합니다. 사용 SDK 버전은 8.4.0 입니다. SDK 공식 문서는 아래 링크를 참고하십시오

   <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-storage</artifactId>
        <version>8.4.0</version>
    </dependency>

How to use

자세한 것은 테스트 코드 SimpleAzureBlobRepositoryTest.java 를 참고하여주십시오.

upload

public class SomeUpload{
    public static void main(String[] args){
        final String connectionUrl = "azure-connectionUrl-with-token";
        final String blobUploadPath = "/container/path1/path2";
        SimpleAzureBlobRepository simpleAzureBlobRepository = new SimpleAzureBlobRepository(AzureBlobClientFactories.createSimpleClient(connectionUrl));
        URI r = simpleAzureBlobRepository.upload(new File("/some/file/direcotry/image.png"), blobUploadPath); 
    }
}
    

download

public class SomeDownload{
    public static void main(String[] args){
        final String connectionUrl = "azure-connectionUrl-with-token";
        final String targetBlobPath = "/container/path1/path2/image.png";
        final String downloadDirectory = "/some/my/download/path";
        SimpleAzureBlobRepository simpleAzureBlobRepository = new SimpleAzureBlobRepository(AzureBlobClientFactories.createSimpleClient(connectionUrl));
        URI r = simpleAzureBlobRepository.download(new File(downloadPath), targetUrl);
    }
}

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.