mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
OpenAPI: add users API
These new APIs match the web client features. I'm aware that some API do not follow REST best practises. I want to avoid things likes "/user/folders/<path>" where "path" must be encoded and making it optional create issues, so I defined resources as query parameters instead of path parameters
This commit is contained in:
@@ -269,6 +269,9 @@ func (fs *SFTPFs) Open(name string, offset int64) (File, *pipeat.PipeReaderAt, f
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
go func() {
|
||||
// if we enable buffering the client stalls
|
||||
//br := bufio.NewReaderSize(f, int(fs.config.BufferSize)*1024*1024)
|
||||
//n, err := fs.copy(w, br)
|
||||
n, err := io.Copy(w, f)
|
||||
w.CloseWithError(err) //nolint:errcheck
|
||||
f.Close()
|
||||
|
||||
Reference in New Issue
Block a user