Skip to content

VersineOrg/CDN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDN

role

this is the content delivery network of Versine, it stores and deletes images

⚠️⚠️⚠️ CDN shouldn't have access to the internet, only to the other Versine microservices intranet. IT STORES AND DELETES IMAGES WITHOUT VERIFYING THE AUTHOR OF THE REQUEST

usage

add a file to the CDN

endpoint

/addFile

method

POST

body

{ "data":"image_file_encoded_to_base64_string" }

server response

success :

{ "status": "success", "message": "saved file", "data": "id_of_the_file" }

fail :

{ "status": "fail", "message": "error_message", "data": null }

delete a file from the CDN

endpoint

/deleteFile

method

POST

body

{ "id":"id_of_the_image_to_delete" }

server response

success :

{ "status": "success", "message": "file deleted", "data": "" }

or

{ "status": "success", "message": "file doesn't exist", "data": "" }

fail :

{ "status": "fail", "message": "error_message", "data": null }

Access a file from the CDN

endpoint

/getFile

method

POST

body

{ "id":"id_of_the_image_to_access" }

server response

success :

{ "status": "success", "message": "accessed file", "data": "image_file_encoded_to_base64_string" }

fail :

{ "status": "fail", "message": "error_message", "data": null }

configuration

this microservice is configured with the file appsettings.json. a template file is provided

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages