sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

I would like to provide an API that returns the hash value of a file #373

Closed ldeng76 closed 2 months ago

ldeng76 commented 3 months ago

Specific Demand

I would like to provide an API that returns the hash value of a file, which is important to verify that the file has been uploaded successfully.

Implement Suggestion

no

sigoden commented 3 months ago

Make sense, add new query param such as GET /path-to-file?hash to return the shas256 hash value of a file.

$ curl localhost:5000/myfile1?hash

d09fd4af745c71fcc13c1e2c9783845c46aa19086bf450f330a89e5de98a69be