Skip to content

Instantly share code, notes, and snippets.

View tushartripathi1998's full-sized avatar

Tushar Tripathi tushartripathi1998

View GitHub Profile
@tushartripathi1998
tushartripathi1998 / AzureBlobFileController.java
Created September 12, 2021 04:24
Medium - Spring Boot - Using Azure Storage Blob to upload and download files
package example.azureblob.azureblob.controller;
import example.azureblob.azureblob.adapter.AzureBlobAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
@tushartripathi1998
tushartripathi1998 / application.properties
Created September 12, 2021 04:14
Medium - Spring Boot - Using Azure Storage Blob to upload and download files
blob.connection-string=<your-connection-string-value>
blob.container-name=<your-container-name>
@tushartripathi1998
tushartripathi1998 / AzureStorageBlobClient.java
Created September 12, 2021 04:09
Medium - Spring Boot - Using Azure Storage Blob to upload and download files
package example.azureblob.azureblob.client;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.azure.storage.blob.*;
@Configuration
public class AzureStorageBlobClient {