Skip to content

anowereng/M2SysAssesment

Repository files navigation

Project

Asynchronously image download and image to base64 convert.

Project folder structure

.
├── M2SysAssesment.API                  
│   ├── wwwroot                             # Contains upload images
│   ├── Conrollers                          
│        └── ImageController                # Download request (POST) , base64 image (GET) end point API here. 
└── ......
├── M2SysAssesment.Services                  
│   ├── Common 
|   |     └── Enums                         
|   |     └── Extensions                    # Extensions apply for duplicate find out and list empty check .   
|   |     └── Helper                        # API Response functionality and constant message write here .
|   ├── Middleware                          # Golbal exception middleware apply .    
│   ├── RequestModel                       
|   ├── ResponseModel                       
|   ├── Services
└── ......

Tools and packages

Project is created with:

  • VS 2022
  • .NET 6.0 (REST API Project)
  • Swashbuckle.AspNetCore (Ver.6.2.3)
  • Microsoft.Extensions.DependencyInjection.Abstractions

[Run your project in vs 2022]

Installation

For run your project in .NET CLI type dotnet run M2SysAssesment.API.csproj

image

image

Copy url (https://localhost:7135) from console and paste postman or type browser below url link .

https://localhost:7135/swagger/index.html

image

Demo data for test

{
  "imageUrls": [
   "https://i.picsum.photos/id/26/4209/2769.jpg?hmac=vcInmowFvPCyKGtV7Vfh7zWcA_Z0kStrPDW3ppP0iGI",
   "https://i.picsum.photos/id/21/3008/2008.jpg?hmac=T8DSVNvP-QldCew7WD4jj_S3mWwxZPqdF0CNPksSko4",
   "https://i.picsum.photos/id/23/3887/4899.jpg?hmac=2fo1Y0AgEkeL2juaEBqKPbnEKm_5Mp0M2nuaVERE6eE",
   "https://i.picsum.photos/id/22/4434/3729.jpg?hmac=fjZdkSMZJNFgsoDh8Qo5zdA_nSGUAWvKLyyqmEt2xs0",
   "https://i.picsum.photos/id/30/1280/901.jpg?hmac=A_hpFyEavMBB7Dsmmp53kPXKmatwM05MUDatlWSgATE",
   "https://i.picsum.photos/id/34/3872/2592.jpg?hmac=4o5QGDd7eVRX8_ISsc5ZzGrHsFYDoanmcsz7kyu8A9A",
   "https://i.picsum.photos/id/39/3456/2304.jpg?hmac=cc_VPxzydwTUbGEtpsDeo2NxCkeYQrhTLqw4TFo-dIg",
   "https://i.picsum.photos/id/42/3456/2304.jpg?hmac=dhQvd1Qp19zg26MEwYMnfz34eLnGv8meGk_lFNAJR3g"
  ],
  "maxDownloadAtOnce": 2
}

API end point check

Download request (POST)

image image image

Get image(base64) by name (GET)

image image

Online test (base64 to image)

Screenshot_1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages