mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Modify: change raw object ID to Hash ID in file service
This commit is contained in:
@@ -231,7 +231,13 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request, fs *
|
||||
|
||||
ctx := r.Context()
|
||||
|
||||
rs, err := fs.Preview(ctx, reqPath, false)
|
||||
exist, file := fs.IsFileExist(reqPath)
|
||||
if !exist {
|
||||
return http.StatusNotFound, nil
|
||||
}
|
||||
fs.SetTargetFile(&[]model.File{*file})
|
||||
|
||||
rs, err := fs.Preview(ctx, 0, false)
|
||||
if err != nil {
|
||||
if err == filesystem.ErrObjectNotExist {
|
||||
return http.StatusNotFound, err
|
||||
|
||||
Reference in New Issue
Block a user