Add "content-sha256" in File API
Description
Dear awesome community!
I'm currently using File API but there is no way to compare the downloaded sha256 file. I could download it, run sha256sum then go on gitlab server and run sha56sum on the local file.
(md5 is not secure, sha512 is probably overkill)
Proposal
Add content_sha256
(whatever)
GET
curl --request GET --header 'PRIVATE-TOKEN: mytoken' "https://mygitlab.com/api/v4/projects/myprojectid/repository/files/myfile?ref=master" | jq.
{
"file_name": "myfile",
"file_path": "myfile",
"size": 1639,
"encoding": "base64",
"content": "xxxxxxxxxxxxxxxxxx",
"content_sha256": "e2104e9d433fdb416ac12931b6185c64a0c79784785815dc4bad26c40c40efc4",
"ref": "master",
"blob_id": "5bc3288f340f81215ce6b8a049ec14f8f6268193",
"commit_id": "84061bbad73d0b3a2a598f43599355a4871034af",
"last_commit_id": "78181ed46d6d8c489dcc96ec1fd5a8bb11a52a8d"
}
Links / references
aws s3: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html
Edited by Ahmet Demir