Anthologia-Newspaper / anthologia-api

Apache License 2.0
0 stars 0 forks source link

[API]: Add a route to PATCH articles with a banner #11

Open alexandre-schaffner opened 1 month ago

alexandre-schaffner commented 1 month ago

Description

After creating an article, users can upload a file for the banner of their article.

A new route is implemented for that: PATCH /articles/:id/banner

:id is the article id The client must provide a file in form-data.

Expected behaviour

The user should be able to upload a banner for its already-created article.

Environment

Proposed solution

The banner is uploaded on IPFS by the backend and the cid stored in the database along the article. The URL to access the banner via a gateway is generated by the backend upon request for the article.