This API endpoint allows users to share a file by generating a unique, shareable link for the specified file.
POST http://localhost:3000/files/:id/share
Replace :id with the file ID you want to share.
Authorization: Bearer <access_token>
curl --location --request POST '<http://localhost:3000/files/5/share>' \\
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE2ODAwMDkwNDZ9.K8jBFmAruSMW4MGWCmQJ5MIwxaQ-O9E0Aehsi4GOpPc'
200 OKapplication/json
{
"share_link": "<https://d237198xeojlsg.cloudfront.net/share/RNrKNzPNmbasJQn38RwxuF_XDQw>"
}
404 Not Foundapplication/json
{
"error": "File not found."
}
400