This API endpoint allows users to fetch a list of uploaded files.
GET http://localhost:3000/files
Authorization: Bearer <access_token>Content-Type: application/json
curl --location --request GET '<http://localhost:3000/files>' \\
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE2ODAwMDkwNDZ9.K8jBFmAruSMW4MGWCmQJ5MIwxaQ-O9E0Aehsi4GOpPc' \\
--header 'Content-Type: application/json'
200 OKapplication/json{
"files": [
// un share file
{
"id": 1,
"user_id": 1,
"status": "init",
"name": "test.png",
"file_type": "image/png",
"size": "100000",
"key": "gjYskiy7nxFkvQ3peu_XDNN3zM8",
"uploaded_at": null,
"shared_at": null,
"shared_expired_at": null,
"created_at": "2023-03-26T09:35:13.580Z",
"updated_at": "2023-03-26T09:35:13.580Z",
"share_link": "",
"private_link": "......."
},
// uploaded and share file
{
"id": 2,
"user_id": 1,
"status": "uploaded",
"name": "test.png",
"file_type": "image/png",
"size": "100000",
"key": "RNrKNzPNmbasJQn38RwxuF_XDQw",
"uploaded_at": null,
"shared_at": "2023-03-27T13:16:28.000Z",
"shared_expired_at": "2023-03-28T13:16:28.000Z",
"created_at": "2023-03-26T09:35:32.217Z",
"updated_at": "2023-03-27T13:16:28.402Z",
"share_link": "......",
"private_link": "....."
},
]
}