dariemcarlosdev / VPKFILEPROCESSORAPP

Blazor Server app that takes a CSV file as input, runs a background job to execute an SSIS package in Azure, and stores the output CSV file in Azure Blob Storage for download.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Microservice 1: File Management Microservice. #21

Closed dariemcarlosdev closed 3 weeks ago

dariemcarlosdev commented 3 weeks ago

This service is responsible for file uploads and interaction with Azure Blob Storage. It triggers the event to start processing the file once it’s uploaded.

Controllers/FileUploadController.cs: This controller expose an API enpoint for file upload.The file should be restricted just to .csv. Once the file is uploaded, It stores the uploaded file into Azure Blob Storage and triggers an event to process it.

Services/AzureBlobStorageService.cs: Contains logic to upload files to Azure Blob Storage and generate a file URL.

Events: Once the file is uploaded, this microservice triggers an event using Azure Event Grid #14 to notify the ProcessingService to start processing.

dariemcarlosdev commented 3 weeks ago

Install Azure SDKs and Required Packages:

Install the required packages for Azure Blob Storage, Event Grid, and API functionalities. dotnet add package Azure.Storage.Blobs dotnet add package Azure.Messaging.EventGrid dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson

Set Up Azure Blob Storage:

Deploy to Azure App Service (Optional):

-You can deploy the microservice to Azure App Service.

Alternatively, you can use Docker if containerization:

docker build -t filemanagementservice:latest . docker run -p 8080:80 filemanagementservice:latest